Skip to content

Commit

Permalink
fixup gh action and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kwmonroe committed Mar 9, 2024
1 parent 550c76a commit e918b9e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
lint-unit:
name: Lint Unit
uses: charmed-kubernetes/workflows/.github/workflows/lint-unit.yaml@main
with:
python: "['3.8', '3.9', '3.10', '3.11']"
needs:
- call-inclusive-naming-check

Expand All @@ -22,14 +24,15 @@ jobs:
- lint-unit
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3/stable
- name: Run integration test
run: tox -e integration
10 changes: 4 additions & 6 deletions tests/integration/test_docker_registry_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ async def test_push_image(ops_test):
for unit in registry_units:
action = await unit.run_action("push", image="python:3.9-slim", pull=True)
output = await action.wait() # wait for result
assert output.data.get("status") == "completed"
assert output.data.get("results", {}).get("outcome") == "success"
assert output.data.get("results", {}).get("raw") == \
assert output.status == "completed"
assert output.results.get("raw") == \
f"pushed {unit.public_address}:5000/python:3.9-slim"


Expand All @@ -63,6 +62,5 @@ async def test_image_list(ops_test):
for unit in registry_units:
action = await unit.run_action("images", repository="python:3.9-slim")
output = await action.wait() # wait for result
assert output.data.get("status") == "completed"
assert "python" in output.data.get("results", {}).get("output")
assert "3.9-slim" in output.data.get("results", {}).get("output")
assert output.status == "completed"
assert "python" in output.results.get("output")
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ deps =
pytest
pytest-operator
ipdb
juju < 3.0 # https://github.com/juju/python-libjuju/issues/719
juju
commands = pytest --tb native --show-capture=no --log-cli-level=INFO -s {posargs} {toxinidir}/tests/integration

0 comments on commit e918b9e

Please sign in to comment.