Skip to content

Commit

Permalink
chore: additional handling for testinfra AIO container start failure
Browse files Browse the repository at this point in the history
  • Loading branch information
pcnc committed Dec 4, 2023
1 parent 256fabc commit 1495558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testinfra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- runner: arm-runner
arch: arm64
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
timeout-minutes: 30
steps:
- uses: actions/checkout@v3

Expand Down
3 changes: 2 additions & 1 deletion testinfra/test_all_in_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ def get_health(container: Container) -> str:
break
sleep(1)
attempts += 1
if attempts > 30:
if attempts > 30 or health == "exited":
# print container logs for debugging
print(container.logs().decode("utf-8"))

raise TimeoutError("Container failed to become healthy.")

# return a testinfra connection to the container
Expand Down

0 comments on commit 1495558

Please sign in to comment.