Skip to content

Commit 9333e66

Browse files
authored
feat: Add logging to scenario tests (#3983)
* feat: Add logging to scenario tests Signed-off-by: jamshale <jamiehalebc@gmail.com> * fix: Remove the orphan removal Signed-off-by: jamshale <jamiehalebc@gmail.com> * fix: Remove log file config from kanon test Signed-off-by: jamshale <jamiehalebc@gmail.com> * feat: docker logs when test fails Signed-off-by: jamshale <jamiehalebc@gmail.com> * Fix config json parsing Signed-off-by: jamshale <jamiehalebc@gmail.com> --------- Signed-off-by: jamshale <jamiehalebc@gmail.com>
1 parent 112e13b commit 9333e66

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/scenario-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ jobs:
6565
docker build -t acapy-test -f docker/Dockerfile.run .
6666
cd scenarios
6767
poetry install --no-root
68-
poetry run pytest -m examples
68+
poetry run pytest -s -m examples

scenarios/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class ExampleFailedException(Exception):
1414

1515
def __init__(self, message: str, exit_status: int):
1616
"""Initialize ExampleFailedException."""
17-
1817
super().__init__(message)
1918
self.exit_status = exit_status
2019

@@ -24,7 +23,6 @@ class ExampleRunner:
2423

2524
def __init__(self, compose_file: str):
2625
"""Initialize ExampleRunner."""
27-
2826
self.compose_file = compose_file
2927

3028
def compose(self, *command: str) -> int:
@@ -43,6 +41,7 @@ def compose(self, *command: str) -> int:
4341

4442
def cleanup(self):
4543
"""Runs docker compose down -v for cleanup."""
44+
self.compose("logs")
4645
exit_status = self.compose("down", "-v")
4746
if exit_status != 0:
4847
raise ExampleFailedException(

scenarios/examples/kanon_issuance_and_presentation/docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
--recreate-wallet
2121
--wallet-name kanon-postgres-normalized
2222
--wallet-key insecure
23-
--wallet-storage-config {"url":"wallet-db:5432","max_connections":100,"min_idle_count":5,"max_idle":10.0,"max_lifetime":7200.0}
24-
--wallet-storage-creds {"account":"myuser","password":"mypass"}
23+
--wallet-storage-config "{\"url\":\"wallet-db:5432\",\"max_connections\":100,\"min_idle_count\":5,\"max_idle\":10.0,\"max_lifetime\":7200.0}"
24+
--wallet-storage-creds "{\"account\":\"myuser\",\"password\":\"mypass\"}"
2525
--dbstore-storage-type postgres_storage
26-
--dbstore-storage-config {"url":"wallet-db:5432","connection_timeout":30.0,"max_connections":100,"min_idle_count":5,"max_idle":10.0,"max_lifetime":7200.0}
27-
--dbstore-storage-creds {"account":"myuser","password":"mypass"}
26+
--dbstore-storage-config "{\"url\":\"wallet-db:5432\",\"connection_timeout\":30.0,\"max_connections\":100,\"min_idle_count\":5,\"max_idle\":10.0,\"max_lifetime\":7200.0}"
27+
--dbstore-storage-creds "{\"account\":\"myuser\",\"password\":\"mypass\"}"
2828
--dbstore-schema-config normalize
2929
--preserve-exchange-records
3030
--genesis-url http://test.bcovrin.vonx.io/genesis
@@ -37,7 +37,6 @@
3737
--auto-respond-credential-offer
3838
--auto-respond-credential-request
3939
--auto-store-credential
40-
--log-file /home/indy/acatest.log
4140
--log-level debug
4241
--trace-target log
4342
--trace-tag acapy.events

0 commit comments

Comments
 (0)