Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #120 from iden3/feature/edu
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
arnaubennassar committed May 29, 2020
2 parents a9d1313 + d8f1436 commit 19da94b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ jobs:
gcloud firebase test android run --type instrumentation --use-orchestrator \
--app android/gointegration/build/outputs/apk/debug/gointegration-debug.apk \
--test android/gointegration/build/outputs/apk/androidTest/debug/gointegration-debug-androidTest.apk \
--device model=Pixel2,version=28,locale=es,orientation=portrait
--device model=dipper,version=28,locale=es,orientation=portrait
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class GomobileIntegrationTest {

// 3. Prove claims
var provedClaims = 0
var provedClaimsZK = 0
for (id in ids){
id?.claimDB?.iterateClaimsJSON(object: ClaimDBIterFner{
override fun fn(key: String, claim: String): Boolean{
Expand All @@ -127,20 +128,28 @@ class GomobileIntegrationTest {
Log.i("fullFlow", "Verify claim ZK: $key. Success? $success. Error? $e")
assertEquals(null, e)
assertEquals(true, success)
provedClaims++
provedClaimsZK++
}
})
return true
}
})
}
// Wait untilall claims have been proved with and without ZK
while (provedClaims < nIdentities*nClaimsPerId*2){
Log.i("fullFlow", "Waiting to prove claims: $provedClaims / ${nIdentities*nClaimsPerId*2}")
// Wait untilall claims have been proved without ZK
while (provedClaims < nIdentities*nClaimsPerId){
Log.i("fullFlow", "Waiting to prove claims without ZK: $provedClaims / ${nIdentities*nClaimsPerId}")
Thread.sleep(2_000)
}
assertEquals(nClaimsPerId*nIdentities, provedClaims)
Log.i("fullFlow", "Claims proved without ZK")

// Wait untilall claims have been proved with ZK
while (provedClaimsZK < nIdentities*nClaimsPerId){
Log.i("fullFlow", "Waiting to prove claims with ZK: $provedClaimsZK / ${nIdentities*nClaimsPerId}")
Thread.sleep(2_000)
}
assertEquals(nClaimsPerId*nIdentities*2, provedClaims)
Log.i("fullFlow", "Claims proved")
assertEquals(nClaimsPerId*nIdentities, provedClaimsZK)
Log.i("fullFlow", "Claims proved with ZK")

// Restart identities
ids = restartIdentities(ids, storePath, sharedStorePath, web3Url, fun (event: Event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import java.util.*
class Iden3mobileInstrumentedTest {

private val web3Url = BuildConfig.INFURA_URL
private val issuerUrl = "http://192.168.200.181:6100/api/unstable/"
private val verifierUrl = "http://192.168.200.181:6200/api/unstable/"
private val issuerUrl = "http://188.166.70.93:6100/api/unstable/"
private val verifierUrl = "http://188.166.70.93:6200/api/unstable/"
private lateinit var instrumentationCtx: Context
private lateinit var storePath: String
private lateinit var sharedStorePath: String
Expand Down
4 changes: 4 additions & 0 deletions go/iden3mobile/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import (
log "github.com/sirupsen/logrus"
)

func init() {
log.SetLevel(log.DebugLevel)
}

type Identity struct {
id *holder.Holder
sharedStorePath string
Expand Down

0 comments on commit 19da94b

Please sign in to comment.