Skip to content

Commit

Permalink
🧪 Configure xdist group for session fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Feb 4, 2025
1 parent f8e2bf2 commit 1b67a3d
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/tests/e2e/issuer/ld_proof/test_ld_proof_did_key_bbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_key_bbs(
faber_client: RichAsyncClient,
faber_and_alice_connection: FaberAliceConnect,
Expand Down Expand Up @@ -136,6 +137,7 @@ async def test_send_jsonld_key_bbs(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_bbs_oob(
faber_client: RichAsyncClient,
alice_member_client: RichAsyncClient,
Expand Down Expand Up @@ -215,6 +217,7 @@ async def test_send_jsonld_bbs_oob(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_request(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -291,6 +294,7 @@ async def test_send_jsonld_request(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_issue_jsonld_bbs(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -359,6 +363,7 @@ async def test_issue_jsonld_bbs(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_mismatch_sov_bbs(
faber_client: RichAsyncClient,
faber_acapy_client: AcaPyClient,
Expand All @@ -385,6 +390,7 @@ async def test_send_jsonld_mismatch_sov_bbs(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_mismatch_bbs_ed(
faber_client: RichAsyncClient,
faber_and_alice_connection: FaberAliceConnect,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_key_ed25519(
faber_client: RichAsyncClient,
faber_and_alice_connection: FaberAliceConnect,
Expand Down Expand Up @@ -132,6 +133,7 @@ async def test_send_jsonld_key_ed25519(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_oob(
faber_client: RichAsyncClient,
alice_member_client: RichAsyncClient,
Expand Down Expand Up @@ -213,6 +215,7 @@ async def test_send_jsonld_oob(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_request(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -281,6 +284,7 @@ async def test_send_jsonld_request(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_issue_jsonld_ed(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -352,6 +356,7 @@ async def test_issue_jsonld_ed(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_mismatch_ed_bbs(
faber_client: RichAsyncClient,
faber_and_alice_connection: FaberAliceConnect,
Expand Down
4 changes: 4 additions & 0 deletions app/tests/e2e/issuer/ld_proof/test_ld_proof_did_sov.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_credential_sov(
faber_client: RichAsyncClient,
faber_acapy_client: AcaPyClient,
Expand Down Expand Up @@ -138,6 +139,7 @@ async def test_send_jsonld_credential_sov(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_oob_sov(
faber_client: RichAsyncClient,
faber_acapy_client: AcaPyClient,
Expand Down Expand Up @@ -208,6 +210,7 @@ async def test_send_jsonld_oob_sov(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_jsonld_request_sov(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -285,6 +288,7 @@ async def test_send_jsonld_request_sov(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_issue_jsonld_sov(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down
2 changes: 2 additions & 0 deletions app/tests/e2e/issuer/test_connections_use_public_did.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_accept_use_public_did(
faber_client: RichAsyncClient, # issuer has public did
meld_co_client: RichAsyncClient, # also has public did
Expand Down Expand Up @@ -54,6 +55,7 @@ async def test_accept_use_public_did(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_accept_use_public_did_between_issuer_and_holder(
faber_client: RichAsyncClient, # issuer has public did
alice_member_client: RichAsyncClient, # no public did
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/issuer/test_get_records_paginated.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
TestMode.regression_run in TestMode.fixture_params,
reason="Temporarily skip; existing tests on dev don't clean up old records yet",
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_get_credential_exchange_records_paginated(
faber_client: RichAsyncClient,
alice_member_client: RichAsyncClient,
Expand Down
5 changes: 5 additions & 0 deletions app/tests/e2e/issuer/test_indy_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_credential_oob(
faber_client: RichAsyncClient,
schema_definition: CredentialSchema,
Expand Down Expand Up @@ -81,6 +82,7 @@ async def test_send_credential_oob(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_credential(
faber_client: RichAsyncClient,
schema_definition: CredentialSchema,
Expand Down Expand Up @@ -123,6 +125,7 @@ async def test_send_credential(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_create_offer(
faber_client: RichAsyncClient,
schema_definition: CredentialSchema,
Expand Down Expand Up @@ -163,6 +166,7 @@ async def test_create_offer(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_send_credential_request(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -238,6 +242,7 @@ async def test_send_credential_request(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_revoke_credential(
faber_client: RichAsyncClient,
alice_member_client: RichAsyncClient,
Expand Down
3 changes: 3 additions & 0 deletions app/tests/e2e/issuer/test_save_exchange_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

@pytest.mark.anyio
@pytest.mark.parametrize("save_exchange_record", [None, False, True])
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_issue_credential_with_save_exchange_record(
faber_client: RichAsyncClient,
credential_definition_id: str,
Expand Down Expand Up @@ -111,6 +112,7 @@ async def test_issue_credential_with_save_exchange_record(

@pytest.mark.anyio
@pytest.mark.parametrize("save_exchange_record", [None, False, True])
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_request_credential_with_save_exchange_record(
faber_client: RichAsyncClient,
credential_definition_id: str,
Expand Down Expand Up @@ -205,6 +207,7 @@ async def test_request_credential_with_save_exchange_record(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_get_cred_exchange_records(
faber_client: RichAsyncClient,
credential_definition_id: str,
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ async def test_get_credential_definition(
"but it fails when run a 2nd time in regression mode"
),
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_create_credential_definition_issuer_tenant(
schema_definition: CredentialSchema,
faber_acapy_client: AcaPyClient,
Expand Down
2 changes: 2 additions & 0 deletions app/tests/e2e/test_did_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
(None, None, True),
],
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_create_did_exchange_request(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -113,6 +114,7 @@ async def test_create_did_exchange_request(
"This test works in isolation. Should be refactored to run in parallel."
)
@pytest.mark.parametrize("use_public_did", [False])
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_accept_did_exchange_invitation(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/test_did_rotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async def test_rotate_did(


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_hangup_did_rotation(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
Expand Down
2 changes: 2 additions & 0 deletions app/tests/e2e/test_jsonld.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@


@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_sign_jsonld(
faber_acapy_client: AcaPyClient,
faber_client: RichAsyncClient,
Expand Down Expand Up @@ -126,6 +127,7 @@ async def test_sign_jsonld(

@pytest.mark.skip("Model validation is overly strict again. To be reviewed")
@pytest.mark.anyio
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_verify_jsonld(
alice_member_client: RichAsyncClient,
faber_acapy_client: AcaPyClient,
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/test_proof_request_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
(None, None),
],
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_proof_model_failures(
issue_credential_to_alice: CredentialExchange, # pylint: disable=unused-argument
acme_acapy_client: AcaPyClient,
Expand Down
10 changes: 10 additions & 0 deletions app/tests/e2e/test_revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_clear_pending_revokes(
faber_client: RichAsyncClient,
revoke_alice_creds: List[CredentialExchange],
Expand Down Expand Up @@ -81,6 +82,7 @@ async def test_clear_pending_revokes(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_clear_pending_revokes_no_map(
faber_client: RichAsyncClient,
revoke_alice_creds: List[CredentialExchange],
Expand Down Expand Up @@ -111,6 +113,7 @@ async def test_clear_pending_revokes_no_map(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_clear_pending_revokes_bad_payload(
faber_client: RichAsyncClient,
):
Expand Down Expand Up @@ -148,6 +151,7 @@ async def test_clear_pending_revokes_bad_payload(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_publish_all_revocations_for_rev_reg_id(
faber_client: RichAsyncClient,
revoke_alice_creds: List[CredentialExchange],
Expand Down Expand Up @@ -185,6 +189,7 @@ async def test_publish_all_revocations_for_rev_reg_id(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_publish_all_revocations_no_payload(
faber_client: RichAsyncClient,
revoke_alice_creds: List[CredentialExchange],
Expand All @@ -211,6 +216,7 @@ async def test_publish_all_revocations_no_payload(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_publish_one_revocation(
faber_client: RichAsyncClient,
revoke_alice_creds: List[CredentialExchange],
Expand Down Expand Up @@ -260,6 +266,7 @@ async def test_publish_one_revocation(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_publish_revocations_bad_payload(
faber_client: RichAsyncClient,
):
Expand Down Expand Up @@ -297,6 +304,7 @@ async def test_publish_revocations_bad_payload(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_get_pending_revocations(
faber_client: RichAsyncClient,
revoke_alice_creds: List[CredentialExchange],
Expand Down Expand Up @@ -339,6 +347,7 @@ async def test_get_pending_revocations(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_get_pending_revocations_bad_payload(
faber_client: RichAsyncClient,
):
Expand All @@ -363,6 +372,7 @@ async def test_get_pending_revocations_bad_payload(
("bad_format", 422),
],
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_fix_rev_reg_bad_id(
faber_client: RichAsyncClient, rev_reg_id: str, status_code: int
):
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/test_wallet_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ async def test_get_credentials(alice_member_client: RichAsyncClient):
TestMode.regression_run in TestMode.fixture_params,
reason="Don't delete credentials in regression run",
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_get_and_delete_credential_record(
alice_member_client: RichAsyncClient,
issue_credential_to_alice: CredentialExchange, # pylint: disable=unused-argument
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/verifier/test_get_credentials_by_proof_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
TestMode.regression_run in TestMode.fixture_params,
reason="Temporarily skip; existing tests on dev don't clean up old records yet",
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_limit_and_offset(
issue_alice_creds: List[CredentialExchange], # pylint: disable=unused-argument
acme_and_alice_connection: AcmeAliceConnect,
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/verifier/test_get_records_paginated.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
TestMode.regression_run in TestMode.fixture_params,
reason="Temporarily skip; existing tests on dev don't clean up old records yet",
)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_get_presentation_exchange_records_paginated(
acme_client: RichAsyncClient,
alice_member_client: RichAsyncClient,
Expand Down
3 changes: 3 additions & 0 deletions app/tests/e2e/verifier/test_many_revocations.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@pytest.mark.anyio
@pytest.mark.skip("This test exists for local testing")
@pytest.mark.parametrize("revoke_many", ["auto_publish_true"], indirect=True)
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_revoke_many_credentials(
revoke_many: List[ # pylint: disable=unused-argument, redefined-outer-name
CredentialExchange
Expand Down Expand Up @@ -108,6 +109,7 @@ async def test_revoke_many_credentials(


@pytest.fixture(scope="function")
@pytest.mark.xdist_group(name="issuer_test_group")
async def revoke_many(
request,
faber_client: RichAsyncClient,
Expand All @@ -131,6 +133,7 @@ async def revoke_many(


@pytest.fixture(scope="function")
@pytest.mark.xdist_group(name="issuer_test_group")
async def issue_many_creds(
faber_client: RichAsyncClient,
alice_member_client: RichAsyncClient,
Expand Down
1 change: 1 addition & 0 deletions app/tests/e2e/verifier/test_predicate_proofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

@pytest.mark.anyio
@pytest.mark.parametrize("predicate", ["<", ">", "<=", ">="])
@pytest.mark.xdist_group(name="issuer_test_group")
async def test_predicate_proofs(
acme_client: RichAsyncClient,
acme_and_alice_connection: AcmeAliceConnect,
Expand Down
Loading

0 comments on commit 1b67a3d

Please sign in to comment.