Skip to content

Commit

Permalink
edge: Fixes integration tests
Browse files Browse the repository at this point in the history
Unpins pytest-operator, the issue mentioned has been fixed and released.
We've updated to juju v3.0, and thus, the juju actions work a bit differently.

Increases the network connectivity timeout.

(cherry picked from commit 15fe424)
  • Loading branch information
claudiubelu committed Aug 14, 2023
1 parent 1eb0768 commit ac6da3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ jobs:
run: python -m pip install tox

- name: Setup operator environment
# TODO: change this to charmed-kubernetes/actions-operator@main once
# the following issue is addressed:
# https://github.com/charmed-kubernetes/actions-operator/issues/32
uses: claudiubelu/actions-operator@main
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
juju-channel: 3.1/stable
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def cli_deploy_bundle(ops_test, name):
# is why we should retry the connection a few times.
@tenacity.retry(
retry=tenacity.retry_if_result(lambda x: x is False),
stop=tenacity.stop_after_attempt(10),
stop=tenacity.stop_after_attempt(15),
wait=tenacity.wait_exponential(multiplier=1, min=5, max=30),
)
def check_legend_connection(app_name, url, headers=None):
Expand Down Expand Up @@ -128,8 +128,8 @@ async def test_config_gitlab(ops_test: pytest_plugin.OpsTest):
"http://%s/studio/log.in/callback" % LEGEND_HOST,
]

assert "completed" == action.data.get("status")
assert expected_uris == action.data.get("results").get("result", "").split("\n")
assert "completed" == action.status
assert expected_uris == action.results.get("result", "").split("\n")


@pytest.mark.abort_on_fail
Expand Down Expand Up @@ -215,5 +215,5 @@ async def test_config_another_hostname(ops_test: pytest_plugin.OpsTest):
"http://%s/studio/log.in/callback" % ANOTHER_LEGEND_HOST,
]

assert "completed" == action.data.get("status")
assert expected_uris == action.data.get("results").get("result", "").split("\n")
assert "completed" == action.status
assert expected_uris == action.results.get("result", "").split("\n")

0 comments on commit ac6da3a

Please sign in to comment.