Skip to content

Commit

Permalink
add e2e test fix_rev_reg with bad id
Browse files Browse the repository at this point in the history
  • Loading branch information
cl0ete committed Nov 29, 2024
1 parent 46f8f28 commit 9ce9ce0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/tests/e2e/test_revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,30 @@ async def test_get_pending_revocations_bad_payload(
await faber_client.get(f"{CREDENTIALS_BASE_PATH}/get-pending-revocations/bad")

assert exc.value.status_code == 422


@pytest.mark.anyio
@pytest.mark.skipif(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.parametrize(
"rev_reg_id, status_code",
[
(
"Ddhz428iyF5h96uLUgiuFa:4:Ddhz428iyF5h96uLUgiuFa:3:CL:8:Epic:CL_ACCUM:2e292c76-bc43-496c-a65a-297fc49c21c6",
404,
),
("bad_format", 422),
],
)
async def test_fix_rev_reg_bad_id(
faber_client: RichAsyncClient, rev_reg_id: str, status_code: int
):
with pytest.raises(HTTPException) as exc:
await faber_client.put(
f"{CREDENTIALS_BASE_PATH}/fix-revocation-registry/{rev_reg_id}",
params={"apply_ledger_update": False},
)

assert exc.value.status_code == status_code

0 comments on commit 9ce9ce0

Please sign in to comment.