Skip to content

Commit

Permalink
Merge pull request hyperledger#1147 from ozheregelya/feature/acceptan…
Browse files Browse the repository at this point in the history
…ce-batches

add NETWORK_MONITOR to acceptance batches
  • Loading branch information
ashcherbakov authored Jan 30, 2019
2 parents dec16bf + ec01697 commit cc36758
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,22 @@ did new seed=TestTrustAnchor30000000000000003 metadata="test trust anchor 3"
did new seed=RandomUser1000000000000000000003 metadata="test identity 1"
did new seed=RandomUser2000000000000000000003 metadata="test identity 2"
did new seed=RandomUser3000000000000000000003 metadata="test identity 3"
did new seed=NetworkMonitor000000000000000001 metadata="network monitor 1"
did new seed=NetworkMonitor000000000000000002 metadata="network monitor 2"
did new seed=NetworkMonitor000000000000000003 metadata="network monitor 3"
# AS Trustee CREATE Steward (steward1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=AhqUV2zHYdNaWLFCCe7xCn role=STEWARD verkey=~YUY2ChUGWJovtU6XTn61D8
- ledger get-nym did=AhqUV2zHYdNaWLFCCe7xCn
# AS Trustee CREATE NetworkMonitor (network monitor 1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=GSoagH52cX69hnn7npUTWy role=NETWORK_MONITOR verkey=~5JEp1pUJbzD1YqimvA6hk6
- ledger get-nym did=GSoagH52cX69hnn7npUTWy
# AS Trustee CREATE NetworkMonitor (network monitor 2) and blacklist it
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=NETWORK_MONITOR verkey=~MnEdozF43zQFRdZLN25mya
ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=
- ledger get-nym did=CjPA39BhAVG5d3mV2ZEAYE
# AS Trustee CREATE TrustAnchor (anchor1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=DriVwCMbtEgkmoEHKin6Ah role=TRUST_ANCHOR verkey=~YPZot1kM4DLwvsX6mtcKd9
Expand Down Expand Up @@ -71,11 +83,21 @@ did use LBbKEeczA9iL21p4Kgxcuf
did use LBbKEeczA9iL21p4Kgxcuf
ledger nym did=Fk9ENxnz1ztDgdivQBJTCZ verkey=~NT9ANFeDhCLKDg5PNKZXKK
- ledger get-nym did=Fk9ENxnz1ztDgdivQBJTCZ
# #8 check that can't add roles back when don't have necessary permissions
# #8 AS IdentityOwner CREATE NetworkMonitor (FAIL)
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=Nd4dUF85aa1JmDFScLfk7o role=NETWORK_MONITOR verkey=~5aJLqtphR3tqymWUwg98Sz
# #9.1 AS IdentityOwner REMOVE NetworkMonitor (FAIL)
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=GSoagH52cX69hnn7npUTWy role=
# #9.2 CHECK NetworkMonitor IS VALID
did use GSoagH52cX69hnn7npUTWy
ledger get-validator-info nodes=Node1
# #10 check that can't add roles back when don't have necessary permissions
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=TRUST_ANCHOR
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=STEWARD
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=TRUSTEE
- ledger nym did=CjPA39BhAVG5d3mV2ZEAYE role=NETWORK_MONITOR
### Additional cases ###
did use V4SGRU86Z58d6TV7PBUe6f
did new seed=RandomAttribOwner000000000000003
Expand All @@ -102,4 +124,10 @@ did use UffJCJngTXc1o84dQ7aEUb
# Identity Owner can create SCHEMA: (PASS with ANYONE_CAN_WRITE=True)
ledger schema name=IdentityOwnerSchema version=1.0 attr_names=name,age
# Identity Owner can create CLAIM_DEF: (PASS with ANYONE_CAN_WRITE=True, but will fail because of wrong schema id)
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=3
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=3
# Identity Owner can't RESTART POOL
did use LBbKEeczA9iL21p4Kgxcuf
- ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4
# Identity Owner can't get validator-info
did use LBbKEeczA9iL21p4Kgxcuf
- ledger get-validator-info nodes=Node1
30 changes: 29 additions & 1 deletion acceptance/indy-cli-batches/AS-03-01-identity-owner.batch
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,22 @@ did new seed=TestTrustAnchor30000000000000003 metadata="test trust anchor 3"
did new seed=RandomUser1000000000000000000003 metadata="test identity 1"
did new seed=RandomUser2000000000000000000003 metadata="test identity 2"
did new seed=RandomUser3000000000000000000003 metadata="test identity 3"
did new seed=NetworkMonitor100000000000000003 metadata="network monitor 1"
did new seed=NetworkMonitor200000000000000003 metadata="network monitor 2"
did new seed=NetworkMonitor300000000000000003 metadata="network monitor 3"
# AS Trustee CREATE Steward (steward1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=AhqUV2zHYdNaWLFCCe7xCn role=STEWARD verkey=~YUY2ChUGWJovtU6XTn61D8
- ledger get-nym did=AhqUV2zHYdNaWLFCCe7xCn
# AS Trustee CREATE NetworkMonitor (network monitor 1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=zsFQSgcs9GdmHr6nYgJfj role=NETWORK_MONITOR verkey=~Y2gktifxXw9J85GXFKpZQ6
- ledger get-nym did=zsFQSgcs9GdmHr6nYgJfj
# AS Trustee CREATE NetworkMonitor (network monitor 2)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=Pn1rJGNmmcKi88B2qo2Emn role=NETWORK_MONITOR verkey=~usAvjM7QfLR9Qf2bZSBZU
ledger nym did=Pn1rJGNmmcKi88B2qo2Emn role=
- ledger get-nym did=Pn1rJGNmmcKi88B2qo2Emn
# AS Trustee CREATE TrustAnchor (anchor1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=DriVwCMbtEgkmoEHKin6Ah role=TRUST_ANCHOR verkey=~YPZot1kM4DLwvsX6mtcKd9
Expand Down Expand Up @@ -71,11 +83,21 @@ did use LBbKEeczA9iL21p4Kgxcuf
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=Fk9ENxnz1ztDgdivQBJTCZ verkey=~NT9ANFeDhCLKDg5PNKZXKK
- ledger get-nym did=Fk9ENxnz1ztDgdivQBJTCZ
# #8 AS IdentityOwner CREATE NetworkMonitor (FAIL)
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=NGMUrRk7EDTRunXLgY7KWn role=NETWORK_MONITOR verkey=~NGMUrRk7EDTRunXLgY7KWn
# #9.1 AS IdentityOwner REMOVE NetworkMonitor (FAIL)
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=zsFQSgcs9GdmHr6nYgJfj role=
# #9.2 CHECK NetworkMonitor IS VALID
did use zsFQSgcs9GdmHr6nYgJfj
ledger get-validator-info nodes=Node1
# #8 check that can't add roles back when don't have necessary permissions
did use LBbKEeczA9iL21p4Kgxcuf
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=TRUST_ANCHOR
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=STEWARD
- ledger nym did=Q8uxmCGdXgLHHtaTwYtVJG role=TRUSTEE
- ledger nym did=Pn1rJGNmmcKi88B2qo2Emn role=NETWORK_MONITOR
### Additional cases ###
did use V4SGRU86Z58d6TV7PBUe6f
did new seed=RandomAttribOwner000000000000003
Expand All @@ -102,4 +124,10 @@ did use UffJCJngTXc1o84dQ7aEUb
# Identity Owner can't create SCHEMA: (FAIL)
- ledger schema name=IdentityOwnerSchema version=1.0 attr_names=name,age
# Identity Owner can't create CLAIM_DEF: (FAIL)
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=3
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=3
# Identity Owner can't RESTART POOL
did use LBbKEeczA9iL21p4Kgxcuf
- ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4
# Identity Owner can't get validator-info
did use LBbKEeczA9iL21p4Kgxcuf
- ledger get-validator-info nodes=Node1
26 changes: 24 additions & 2 deletions acceptance/indy-cli-batches/AS-03-01-steward.batch
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ did new seed=RandomUser2000000000000000000001 metadata="test identity 2"
did new seed=RandomUser4000000000000000000001 metadata="test identity 4"
did new seed=RandomUser5000000000000000000001 metadata="test identity 5"
did new seed=000000000000000000000000Trustee1 metadata="default trustee"
did new seed=NetworkMonitor100000000000000001 metadata="network monitor 1"
did new seed=NetworkMonitor200000000000000001 metadata="network monitor 2"
did new seed=NetworkMonitor300000000000000001 metadata="network monitor 3"
did use V4SGRU86Z58d6TV7PBUe6f
# AS Trustee CREATE Steward (steward1)
ledger nym did=7qFmEyYCXcmUFVied5Sp3b role=STEWARD verkey=~Mj3PFUSi6qmrTRonFXHx9n
Expand Down Expand Up @@ -80,8 +83,21 @@ ledger nym did=Xm3b3LtJ3UoL5KeYT7ti7j verkey=~GmTyyvE4eHWeSWuiAtmE19
did use 7qFmEyYCXcmUFVied5Sp3b
- ledger nym did=7qFmEyYCXcmUFVied5Sp3b role=
# #9.2 CHECK Steward IS VALID
ledger nym did=Jt7aMnw77aoaBMyhXUNjtt verkey=~DT5pLP1wcvsgAzM78sqiRJ
ledger nym did=Jt7aMnw77aoaBMyhXUNjt1 verkey=~DT5pLP1wcvsgAzM78sqiR1 role=TRUST_ANCHOR
- ledger get-nym did=Jt7aMnw77aoaBMyhXUNjtt
# #10 AS Steward (steward1) CREATE NetworkMonitor (PASS)
did use 7qFmEyYCXcmUFVied5Sp3b
ledger nym did=7e6ttq44HKVSHitCE3BLXv role=NETWORK_MONITOR verkey=~9NGbkySmcB9d6rZ7pPxwtY
# #11.1 AS Steward (steward1) REMOVE NetworkMonitor (PASS)
ledger nym did=7e6ttq44HKVSHitCE3BLXv role=
# #11.2 CHECK NetworkMonitor IS INVALID
did use 7e6ttq44HKVSHitCE3BLXv
- ledger get-validator-info nodes=Node1
# #12.1 AS Steward (steward1) RESTORE NetworkMonitor (PASS)
ledger nym did=7e6ttq44HKVSHitCE3BLXv role=NETWORK_MONITOR
# #12.2 CHECK NetworkMonitor IS VALID
did use 7e6ttq44HKVSHitCE3BLXv
ledger get-validator-info nodes=Node1
### Additional cases ###
did use V4SGRU86Z58d6TV7PBUe6f
did new seed=RandomAttribOwner000000000000001
Expand All @@ -108,4 +124,10 @@ did use 6LKnRH6hWPSpoWu824s5JH
# Steward can create SCHEMA:
ledger schema name=StewardSchema version=1.0 attr_names=name,age
# Steward can create CLAIM_DEF (will fail because of wrong schema id):
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=1
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=1
# Steward can't RESTART POOL
did use SvXt2QGwZF1kXTcpd2pJ37
- ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4
# Steward can get validator-info
did use SvXt2QGwZF1kXTcpd2pJ37
ledger get-validator-info nodes=Node1
35 changes: 32 additions & 3 deletions acceptance/indy-cli-batches/AS-03-01-trust-anchor.batch
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ did new seed=TestTrustAnchorCreateTrustAncho4 metadata="Trust Anchor 4"
did new seed=TestTrustAnchorRandomUser1000002 metadata="Random User 1"
did new seed=TestTrustAnchorRandomUser2000002 metadata="Random User 2"
did new seed=TestTrustAnchorRandomUser3000002 metadata="Random User 3"
did new seed=NetworkMonitor100000000000000002 metadata="network monitor 1"
did new seed=NetworkMonitor200000000000000002 metadata="network monitor 2"
did new seed=NetworkMonitor300000000000000002 metadata="network monitor 3"
# AS Trustee CREATE Steward (steward1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=23LxaWGVajU7vMn7zcrHGK role=STEWARD verkey=~UgkZ1ktZV2DQg1sJn3tjdP
Expand All @@ -29,7 +32,17 @@ ledger nym did=T6XTs3nSU3J7ptAcxSnaVo role=TRUST_ANCHOR verkey=~5izgZjWpw3gxeDB9
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=TPrMRHHSunP3cEtpkY8gi7 role=TRUST_ANCHOR verkey=~ANMdNhQ3uuyXDmn7cxi8df
- ledger get-nym did=TPrMRHHSunP3cEtpkY8gi7
# test section
# AS Trustee CREATE NetworkMonitor (network monitor 1)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=E26xPPB4bhNkq5Dg4VDjca role=NETWORK_MONITOR verkey=~5tog9W8jT14rWCEyhgSoTP
- ledger get-nym did=E26xPPB4bhNkq5Dg4VDjca
# AS Trustee CREATE NetworkMonitor (network monitor 2) and blacklist it
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=UR1jYsBfADbYK5FZoF76Mh role=NETWORK_MONITOR verkey=~TBtVAJCA6BwVyQSmCanRQy
ledger nym did=UR1jYsBfADbYK5FZoF76Mh role=
################
# test section #
################
# #1 AS TrustAnchor CREATE IdentityOwner (user1) (PASS)
did use T6XTs3nSU3J7ptAcxSnaVo
ledger nym did=MXYSvpB5e549z6nqa1nTEh verkey=~PR7BXc75UwtiPvKjtDn26N
Expand Down Expand Up @@ -73,11 +86,21 @@ did use T6XTs3nSU3J7ptAcxSnaVo
# #8.2 CHECK TrustAnchor IS VALID
ledger nym did=WDLETDtBugFiJvtkghHoH verkey=~QdAhvFaZ81ZZ1DxwqZ5i8i
- ledger get-nym did=WDLETDtBugFiJvtkghHoH
# #9 check that can't add roles back when don't have necessary permissions
# #9 AS TrustAnchor CREATE NetworkMonitor (FAIL)
did use T6XTs3nSU3J7ptAcxSnaVo
- ledger nym did=CUH8zNzehDNhpsGAnXJauU role=NETWORK_MONITOR verkey=~CgMAueZVNZRUsCrjgHsKs4
# #10.1 AS TrustAnchor REMOVE NetworkMonitor (FAIL)
did use T6XTs3nSU3J7ptAcxSnaVo
- ledger nym did=E26xPPB4bhNkq5Dg4VDjca role=
# #10.2 CHECK NetworkMonitor IS VALID
did use E26xPPB4bhNkq5Dg4VDjca
ledger get-validator-info nodes=Node1
# #11 check that can't add roles back when don't have necessary permissions
did use T6XTs3nSU3J7ptAcxSnaVo
- ledger nym did=WDLETDtBugFiJvtkghHoH role=TRUST_ANCHOR
- ledger nym did=WDLETDtBugFiJvtkghHoH role=STEWARD
- ledger nym did=WDLETDtBugFiJvtkghHoH role=TRUSTEE
- ledger nym did=UR1jYsBfADbYK5FZoF76Mh role=NETWORK_MONITOR
### Additional cases ###
did use V4SGRU86Z58d6TV7PBUe6f
did new seed=RandomAttribOwner000000000000002
Expand All @@ -104,4 +127,10 @@ did use ETcbLj612u9oXr7adZSWZV
# TrustAnchor can create SCHEMA:
ledger schema name=TrustAnchorSchema version=1.0 attr_names=name,age
# TrustAnchor can create CLAIM_DEF (will fail because of wrong schema id):
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=2
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=2
# Identity Owner can't RESTART POOL
did use T6XTs3nSU3J7ptAcxSnaVo
- ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4
# Identity Owner can't get validator-info
did use T6XTs3nSU3J7ptAcxSnaVo
- ledger get-validator-info nodes=Node1
24 changes: 23 additions & 1 deletion acceptance/indy-cli-batches/AS-03-01-trustee.batch
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ did new seed=RandomUser2000000000000000000000 metadata="test identity 2"
did new seed=RandomUser4000000000000000000000 metadata="test identity 4"
did new seed=RandomUser5000000000000000000000 metadata="test identity 5"
did new seed=000000000000000000000000Trustee1 metadata="default trustee"
did new seed=NetworkMonitor100000000000000000 metadata="network monitor 1"
did new seed=NetworkMonitor200000000000000000 metadata="network monitor 2"
did new seed=NetworkMonitor300000000000000000 metadata="network monitor 3"
did use V4SGRU86Z58d6TV7PBUe6f
# AS Trustee (default) CREATE Trustee (trustee2)
ledger nym did=QQMQmb1mrBRJR3vx6GP4kg role=TRUSTEE verkey=~7Cj2MTAjyAbHdAiuafgCUW
Expand Down Expand Up @@ -86,6 +89,19 @@ ledger nym did=NhF3hPZyV715sfmvsjhj1h verkey=~EjjPJGQcnFGhuyS35bVMGA
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=6nnZTxQ18EkVEjVV6hBMeT verkey=~2TBdyJLgAhkbogxjpUfPJD
- ledger get-nym did=6nnZTxQ18EkVEjVV6hBMeT
# #10 AS Trustee (default) CREATE NetworkMonitor (PASS)
did use V4SGRU86Z58d6TV7PBUe6f
ledger nym did=5JNBLdovQap28Ncm8haqH4 role=NETWORK_MONITOR verkey=~VvRtNwrsLbgikyzAz3vohj
# #11.1 AS Trustee (default) REMOVE NetworkMonitor (PASS)
ledger nym did=5JNBLdovQap28Ncm8haqH4 role=
# #11.2 CHECK NetworkMonitor IS INVALID
did use V4SGRU86Z58d6TV7PBUe6f
- ledger get-validator-info nodes=Node1
# #12.1 AS Trustee (default) RESTORE NetworkMonitor (PASS)
ledger nym did=5JNBLdovQap28Ncm8haqH4 role=NETWORK_MONITOR
# #12.2 CHECK NetworkMonitor IS VALID
did use 5JNBLdovQap28Ncm8haqH4
ledger get-validator-info nodes=Node1
# #11 AS Trustee (trustee2) REMOVE self (trustee2) (PASS)
did use QQMQmb1mrBRJR3vx6GP4kg
ledger nym did=QQMQmb1mrBRJR3vx6GP4kg role=
Expand Down Expand Up @@ -117,4 +133,10 @@ did use 484PvcK1gUqwWEWCkumDzA
# Trustee can create SCHEMA:
ledger schema name=TrusteeSchema version=1.0 attr_names=name,age
# Trustee can create CLAIM_DEF (will fail because of wrong schema id):
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=10
- ledger cred-def schema_id=1 signature_type=CL primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} tag=10
# Steward can RESTART POOL
did use 484PvcK1gUqwWEWCkumDzA
ledger pool-restart action=start datetime=2020-01-25T12:49:05.258870+00:00 nodes=Node4
# Steward can get validator-info
did use 484PvcK1gUqwWEWCkumDzA
ledger get-validator-info nodes=Node1

0 comments on commit cc36758

Please sign in to comment.