Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example integration test issuing 2 credentials under the same schema #2948

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
"""
)