Skip to content

Commit

Permalink
integration: Switches juju to 3.1 for integration tests
Browse files Browse the repository at this point in the history
The latest release of the postgresql-k8s charm is supported
by juju 3.0 or newer. The charmed-kubernetes/actions-operator@main
action install juju 2.9 by default.

Additionally, switches microk8s version to 1.27-strict/stable, as
juju 3.0 and newer requires microk8s to be strictly confined.

Updated the Python juju dependency.
  • Loading branch information
claudiubelu committed Jun 11, 2023
1 parent 6495b33 commit 153efd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
juju-channel: 3.1/stable
channel: 1.27-strict/stable
microk8s-addons: "storage dns rbac ingress"

- name: Run integration tests
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
METADATA = yaml.safe_load(pathlib.Path("./metadata.yaml").read_text())
APP_NAME = METADATA["name"]
POSTGRESQL_CHARM = "postgresql-k8s"
POSTGRESQL_CHARM_CHANNEL = "14/stable"
NGINX_INGRESS_CHARM = "nginx-ingress-integrator"


Expand Down Expand Up @@ -60,7 +61,7 @@ async def test_build_and_deploy(ops_test: pytest_plugin.OpsTest):
)

# Deploy the needed postgresql-k8s charm and relate it to the waltz charm.
await ops_test.model.deploy(POSTGRESQL_CHARM)
await ops_test.model.deploy(POSTGRESQL_CHARM, channel=POSTGRESQL_CHARM_CHANNEL)

# issuing dummy update_status just to trigger an event
await ops_test.model.set_config({"update-status-hook-interval": "10s"})
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ commands =
description = Run integration tests
deps =
pytest < 7.3.0
juju < 3.1.0
juju < 3.2.0
pytest-operator < 0.24.0
tenacity < 8.3.0
requests < 2.29.0
Expand Down

0 comments on commit 153efd4

Please sign in to comment.