Skip to content

Commit

Permalink
Fix scenario tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie Hale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale committed Sep 12, 2024
1 parent e12fc05 commit 7d23c3b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions scenarios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Every test example will have a docker-compose.yml file for all the agents and se
- From the scenarios directory.
- Make sure the local acapy image is up to date.
- `cd ..`
- `docker build -t acapy-test -f ../docker/Dockerfile.run .`
- `docker build -t acapy-test -f ./docker/Dockerfile.run .`
- `cd scenarios`
- Navigate to the base example. `cd examples/simple`
- `docker compose up`
Expand All @@ -19,7 +19,7 @@ To run all the tests with pytest:
- From the scenarios directory.
- Make sure the local acapy image is up to date.
- `cd ..`
- `docker build -t acapy-test -f ../docker/Dockerfile.run .`
- `docker build -t acapy-test -f ./docker/Dockerfile.run .`
- `cd scenarios`
- `poetry run pytest -m examples`
- TODO: easily run individual tests with pytest.
3 changes: 1 addition & 2 deletions scenarios/examples/connectionless/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ async def icv2():
"role": "ENDORSER",
},
) as resp:
if resp.ok:
return await resp.json()
assert resp.ok

await alice.post("/wallet/did/public", params=params(did=public_did.did))

Expand Down
3 changes: 1 addition & 2 deletions scenarios/examples/json_ld/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ async def main():
"role": "ENDORSER",
},
) as resp:
if resp.ok:
return await resp.json()
assert resp.ok

await alice.post(
"/wallet/did/public", params=params(did=public_did.did)
Expand Down
3 changes: 1 addition & 2 deletions scenarios/examples/multitenancy/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ async def main():
"role": "ENDORSER",
},
) as resp:
if resp.ok:
return await resp.json()
assert resp.ok

await alice.post("/wallet/did/public", params=params(did=public_did.did))
_, cred_def = await indy_anoncred_credential_artifacts(
Expand Down
3 changes: 1 addition & 2 deletions scenarios/examples/presenting_revoked_credential/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ async def main():
"role": "ENDORSER",
},
) as resp:
if resp.ok:
return await resp.json()
assert resp.ok

await alice.post("/wallet/did/public", params=params(did=public_did.did))
schema, cred_def = await indy_anoncred_credential_artifacts(
Expand Down
3 changes: 1 addition & 2 deletions scenarios/examples/self_attested/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ async def main():
"role": "ENDORSER",
},
) as resp:
if resp.ok:
return await resp.json()
assert resp.ok

await alice.post("/wallet/did/public", params=params(did=public_did.did))
schema, cred_def = await indy_anoncred_credential_artifacts(
Expand Down

0 comments on commit 7d23c3b

Please sign in to comment.