Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PolycentricAndroid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoStreaming
PolycentricAndroid
Commits
a4aa3726
Commit
a4aa3726
authored
1 year ago
by
Koen
Browse files
Options
Downloads
Patches
Plain Diff
Changed claimType field to long.
parent
843db545
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/androidTest/java/com/futo/polycentric/core/ProcessHandleTests.kt
+3
-3
3 additions, 3 deletions
...Test/java/com/futo/polycentric/core/ProcessHandleTests.kt
app/src/main/java/com/futo/polycentric/core/ApiMethods.kt
+2
-2
2 additions, 2 deletions
app/src/main/java/com/futo/polycentric/core/ApiMethods.kt
with
5 additions
and
5 deletions
app/src/androidTest/java/com/futo/polycentric/core/ProcessHandleTests.kt
+
3
−
3
View file @
a4aa3726
...
@@ -177,7 +177,7 @@ class ProcessHandleTests {
...
@@ -177,7 +177,7 @@ class ProcessHandleTests {
assertEquals
(
"hello"
,
s1State
.
description
)
assertEquals
(
"hello"
,
s1State
.
description
)
val
resolved
=
ApiMethods
.
getResolveClaim
(
TestConstants
.
SERVER
,
s1p1
.
system
.
toProto
(),
ClaimType
.
HACKER_NEWS
,
"pg"
)
val
resolved
=
ApiMethods
.
getResolveClaim
(
TestConstants
.
SERVER
,
s1p1
.
system
.
toProto
(),
ClaimType
.
HACKER_NEWS
.
value
,
"pg"
)
val
events
=
resolved
.
matchesList
.
flatMap
{
arrayListOf
(
it
.
claim
).
apply
{
addAll
(
it
.
proofChainList
)
}
}
val
events
=
resolved
.
matchesList
.
flatMap
{
arrayListOf
(
it
.
claim
).
apply
{
addAll
(
it
.
proofChainList
)
}
}
assertEquals
(
1
,
resolved
.
matchesList
.
size
)
assertEquals
(
1
,
resolved
.
matchesList
.
size
)
assertEquals
(
2
,
events
.
size
)
assertEquals
(
2
,
events
.
size
)
...
@@ -197,7 +197,7 @@ class ProcessHandleTests {
...
@@ -197,7 +197,7 @@ class ProcessHandleTests {
Synchronization
.
fullyBackFillServers
(
s1p1
,
s1p1
.
system
)
Synchronization
.
fullyBackFillServers
(
s1p1
,
s1p1
.
system
)
val
resolved
=
ApiMethods
.
getResolveClaim
(
TestConstants
.
SERVER
,
s1p1
.
system
.
toProto
(),
ClaimType
.
HACKER_NEWS
,
"pg"
)
val
resolved
=
ApiMethods
.
getResolveClaim
(
TestConstants
.
SERVER
,
s1p1
.
system
.
toProto
(),
ClaimType
.
HACKER_NEWS
.
value
,
"pg"
)
val
events
=
resolved
.
matchesList
.
flatMap
{
arrayListOf
(
it
.
claim
).
apply
{
addAll
(
it
.
proofChainList
)
}
}
val
events
=
resolved
.
matchesList
.
flatMap
{
arrayListOf
(
it
.
claim
).
apply
{
addAll
(
it
.
proofChainList
)
}
}
assertEquals
(
1
,
resolved
.
matchesList
.
size
)
assertEquals
(
1
,
resolved
.
matchesList
.
size
)
assertEquals
(
2
,
events
.
size
)
assertEquals
(
2
,
events
.
size
)
...
@@ -425,7 +425,7 @@ class ProcessHandleTests {
...
@@ -425,7 +425,7 @@ class ProcessHandleTests {
val
resolved
=
ApiMethods
.
getResolveClaim
(
val
resolved
=
ApiMethods
.
getResolveClaim
(
TestConstants
.
SERVER
,
TestConstants
.
SERVER
,
s1p1
.
system
.
toProto
(),
s1p1
.
system
.
toProto
(),
ClaimType
.
HACKER_NEWS
,
ClaimType
.
HACKER_NEWS
.
value
,
"fake_user"
"fake_user"
)
)
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/futo/polycentric/core/ApiMethods.kt
+
2
−
2
View file @
a4aa3726
...
@@ -59,9 +59,9 @@ class ApiMethods {
...
@@ -59,9 +59,9 @@ class ApiMethods {
return
Protocol
.
Events
.
parseFrom
(
result
.
get
())
return
Protocol
.
Events
.
parseFrom
(
result
.
get
())
}
}
fun
getResolveClaim
(
server
:
String
,
trustRoot
:
Protocol
.
PublicKey
,
claimType
:
ClaimType
,
matchAnyField
:
String
):
Protocol
.
QueryClaimToSystemResponse
{
fun
getResolveClaim
(
server
:
String
,
trustRoot
:
Protocol
.
PublicKey
,
claimType
:
Long
,
matchAnyField
:
String
):
Protocol
.
QueryClaimToSystemResponse
{
val
query
=
Protocol
.
QueryClaimToSystemRequest
.
newBuilder
()
val
query
=
Protocol
.
QueryClaimToSystemRequest
.
newBuilder
()
.
setClaimType
(
claimType
.
value
)
.
setClaimType
(
claimType
)
.
setTrustRoot
(
trustRoot
)
.
setTrustRoot
(
trustRoot
)
.
setMatchAnyField
(
matchAnyField
)
.
setMatchAnyField
(
matchAnyField
)
.
build
().
toByteArray
().
toBase64Url
()
.
build
().
toByteArray
().
toBase64Url
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment