From 764e8ee8f287008bca8dbe19ad0cb89b45cacf1e Mon Sep 17 00:00:00 2001 From: Ian Costanzo Date: Tue, 14 May 2024 10:34:05 -0700 Subject: [PATCH] Example integration test issuing 2 credentials under the same schema Signed-off-by: Ian Costanzo --- demo/features/0454-present-proof.feature | 25 ++++++++++++++++++++ demo/features/steps/0453-issue-credential.py | 19 +++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/demo/features/0454-present-proof.feature b/demo/features/0454-present-proof.feature index 8787541703..ebc2a87792 100644 --- a/demo/features/0454-present-proof.feature +++ b/demo/features/0454-present-proof.feature @@ -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 | | + | Faber | verifier | | + | Bob | prover | | + And "" and "Bob" have an existing connection + And "Bob" has an issued credential from "" + And "" revokes the credential + And "Bob" has another issued credential from "" + And "Faber" and "Bob" have an existing connection + When "Faber" sends a request with explicit revocation status for proof presentation 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 | diff --git a/demo/features/steps/0453-issue-credential.py b/demo/features/steps/0453-issue-credential.py index e702403d51..6dc33f428d 100644 --- a/demo/features/steps/0453-issue-credential.py +++ b/demo/features/steps/0453-issue-credential.py @@ -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 + """ + )