Skip to content

Commit

Permalink
Merge pull request openwallet-foundation#2948 from ianco/master
Browse files Browse the repository at this point in the history
Example integration test issuing 2 credentials under the same schema
  • Loading branch information
ianco authored May 14, 2024
2 parents 0da1552 + 764e8ee commit f37bc91
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
25 changes: 25 additions & 0 deletions demo/features/0454-present-proof.feature
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,28 @@ Feature: RFC 0454 Aries agent present proof
Examples:
| issuer1 | Acme1_capabilities | issuer2 | Acme2_capabilities | Bob_cap | Schema_name_1 | Credential_data_1 | Schema_name_2 | Credential_data_2 | Proof_request |
| Acme1 | --revocation --public-did --wallet-type askar-anoncreds | Acme2 | --public-did --wallet-type askar-anoncreds | --wallet-type askar-anoncreds | driverslicense_v2 | Data_DL_MaxValues | health_id | Data_DL_MaxValues | DL_age_over_19_v2_with_health_id_no_revoc |

@T003-RFC0454.4
Scenario Outline: Present Proof for a credential where multiple credentials are issued and all but one are revoked
Given we have "3" agents
| name | role | capabilities |
| Acme1 | issuer1 | <Acme1_capabilities> |
| Faber | verifier | <Acme1_capabilities> |
| Bob | prover | <Bob_cap> |
And "<issuer1>" and "Bob" have an existing connection
And "Bob" has an issued <Schema_name_1> credential <Credential_data_1> from "<issuer1>"
And "<issuer1>" revokes the credential
And "Bob" has another issued <Schema_name_1> credential <Credential_data_1> from "<issuer1>"
And "Faber" and "Bob" have an existing connection
When "Faber" sends a request with explicit revocation status for proof presentation <Proof_request> to "Bob"
Then "Faber" has the proof verified

@WalletType_Askar
Examples:
| issuer1 | Acme1_capabilities | Bob_cap | Schema_name_1 | Credential_data_1 | Proof_request |
| Acme1 | --revocation --public-did | | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 |

@WalletType_Askar_AnonCreds
Examples:
| issuer1 | Acme1_capabilities | Bob_cap | Schema_name_1 | Credential_data_1 | Proof_request |
| Acme1 | --revocation --public-did --wallet-type askar-anoncreds | --wallet-type askar-anoncreds | driverslicense_v2 | Data_DL_MaxValues | DL_age_over_19_v2 |
19 changes: 19 additions & 0 deletions demo/features/steps/0453-issue-credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,22 @@ def step_impl(context, holder, schema_name, credential_data, issuer):
+ """" has the credential issued
"""
)


@given(
'"{holder}" has another issued {schema_name} credential {credential_data} from "{issuer}"'
)
def step_impl(context, holder, schema_name, credential_data, issuer):
context.execute_steps(
# TODO possibly check that the requested schema is "active" (if there are multiple schemas)
'''
When "'''
+ issuer
+ """" offers a credential with data """
+ credential_data
+ '''
Then "'''
+ holder
+ """" has the credential issued
"""
)

0 comments on commit f37bc91

Please sign in to comment.