From 2adb5c835a510ed41092094705938111f59265bc Mon Sep 17 00:00:00 2001 From: Yanks Yoon <37652070+yanksyoon@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:46:13 +0900 Subject: [PATCH] fix: mysql deploy (#232) --- .github/workflows/integration_test_juju3.yaml | 4 ++-- tests/integration/conftest.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration_test_juju3.yaml b/.github/workflows/integration_test_juju3.yaml index 3bcfaeb7..44ca1ce7 100644 --- a/.github/workflows/integration_test_juju3.yaml +++ b/.github/workflows/integration_test_juju3.yaml @@ -14,8 +14,8 @@ jobs: --openstack-rc=${GITHUB_WORKSPACE}/openrc --kube-config=${GITHUB_WORKSPACE}/kube-config --screenshot-dir=/tmp - juju-channel: 3.1/stable - channel: 1.27-strict/stable + juju-channel: 3/stable + channel: 1.29-strict/stable modules: '["test_addon", "test_core"]' pre-run-script: | -c "sudo microk8s enable hostpath-storage diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 1eca6e91..ab789336 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -95,11 +95,11 @@ async def wordpress_fixture( @pytest_asyncio.fixture(scope="module") async def prepare_mysql(ops_test: OpsTest, wordpress: WordpressApp, model: Model): """Deploy and relate the mysql-k8s charm for integration tests.""" - await ops_test.juju("deploy", "mysql-k8s", "--channel=8.0/candidate", "--trust") - await model.wait_for_idle(status="active", apps=["mysql-k8s"], timeout=30 * 60) - await model.relate(f"{wordpress.name}:database", "mysql-k8s:database") + app = await model.deploy("mysql-k8s", channel="8.0/stable", trust=True) + await model.wait_for_idle(status="active", apps=[app.name], timeout=30 * 60) + await model.relate(f"{wordpress.name}:database", f"{app.name}:database") await model.wait_for_idle( - status="active", apps=["mysql-k8s", wordpress.name], timeout=40 * 60, idle_period=30 + status="active", apps=[app.name, wordpress.name], timeout=40 * 60, idle_period=30 )