From 4b383c7c425227124b58604350113817dd340055 Mon Sep 17 00:00:00 2001 From: Smail Kourta Date: Fri, 25 Sep 2026 12:02:07 +0400 Subject: [PATCH 1/2] chore: stabilize-ci-tests-valkey-mongodb --- tests/integration/constants.py | 1 + tests/integration/test_mongodb.py | 10 ++++++++-- tests/integration/test_valkey.py | 21 +++++++++++++-------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/tests/integration/constants.py b/tests/integration/constants.py index 6cc6b272..357f8a0f 100644 --- a/tests/integration/constants.py +++ b/tests/integration/constants.py @@ -33,6 +33,7 @@ CASSANDRA_EXTRA_USER_ROLES = "ALTER,AUTHORIZE,DROP,MODIFY,SELECT,CREATE" VALKEY = "valkey" +VALKEY_BASE = "ubuntu@26.04" VALKEY_KEY_PREFIX = "client_application:" MLFLOW = "mlflow-server" diff --git a/tests/integration/test_mongodb.py b/tests/integration/test_mongodb.py index 16ed63d8..a5663d86 100644 --- a/tests/integration/test_mongodb.py +++ b/tests/integration/test_mongodb.py @@ -67,8 +67,14 @@ async def test_deploy_and_relate_mongodb(ops_test: OpsTest, cloud_name: str): await ops_test.model.wait_for_idle(apps=[MONGODB[cloud_name]], wait_for_active=True) assert ops_test.model.applications[MONGODB[cloud_name]].status == "active" integrator_relation = await ops_test.model.add_relation(DATA_INTEGRATOR, MONGODB[cloud_name]) - await ops_test.model.wait_for_idle(apps=[DATA_INTEGRATOR, MONGODB[cloud_name]]) - assert ops_test.model.applications[DATA_INTEGRATOR].status == "active" + # mongodb-k8s reports active before its workload is up and skips client requests until the + # database is initialised, so wait for data-integrator to receive credentials + await ops_test.model.wait_for_idle( + apps=[DATA_INTEGRATOR, MONGODB[cloud_name]], + status="active", + idle_period=10, + timeout=1000, + ) # check if secrets are used on Juju3 assert await check_secrets_usage_matching_juju_version( diff --git a/tests/integration/test_valkey.py b/tests/integration/test_valkey.py index 78545506..0655f57e 100644 --- a/tests/integration/test_valkey.py +++ b/tests/integration/test_valkey.py @@ -10,7 +10,7 @@ import pytest from pytest_operator.plugin import OpsTest -from .constants import APP, DATA_INTEGRATOR, VALKEY, VALKEY_KEY_PREFIX +from .constants import APP, DATA_INTEGRATOR, VALKEY, VALKEY_BASE, VALKEY_KEY_PREFIX from .helpers import ( fetch_action_database, fetch_action_get_credentials, @@ -31,14 +31,19 @@ async def test_deploy( } await ops_test.model.set_config(model_config) + # python-libjuju does not know the ubuntu@26.04 base yet, so deploy Valkey through the CLI; + # without an explicit base, Juju picks the older ubuntu@24.04 revision from the channel + return_code, _, stderr = await ops_test.juju( + "deploy", + VALKEY, + "--channel=9/edge", + f"--base={VALKEY_BASE}", + "--num-units=3", + "--trust", + ) + assert return_code == 0, f"Failed to deploy {VALKEY}: {stderr}" + await asyncio.gather( - ops_test.model.deploy( - VALKEY, - channel="9/edge", - application_name=VALKEY, - num_units=3, - trust=True, - ), ops_test.model.deploy( data_integrator_charm, application_name="data-integrator", num_units=1, series="jammy" ), From df8ece2f914a0989e3cc8601b36ed3cc8a240f48 Mon Sep 17 00:00:00 2001 From: Smail Kourta Date: Fri, 25 Sep 2026 16:01:38 +0400 Subject: [PATCH 2/2] fix: disable kafka 3 tests --- tests/spread/test_kafka.py/task.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/spread/test_kafka.py/task.yaml b/tests/spread/test_kafka.py/task.yaml index bf2fa8d8..e537e018 100644 --- a/tests/spread/test_kafka.py/task.yaml +++ b/tests/spread/test_kafka.py/task.yaml @@ -1,4 +1,6 @@ summary: test_kafka.py +# TODO: re-enable once the test moves to Kafka 4 +manual: true environment: TEST_MODULE: test_kafka.py execute: |