From d3cbad06b805dc486419ca82d6fa54a30474e807 Mon Sep 17 00:00:00 2001 From: Neha Oudin Date: Thu, 24 Sep 2026 11:43:52 +0200 Subject: [PATCH 1/2] fix: bump to mongodb 8 --- tests/integration/test_mongodb.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/integration/test_mongodb.py b/tests/integration/test_mongodb.py index 16ed63d8..90436e46 100644 --- a/tests/integration/test_mongodb.py +++ b/tests/integration/test_mongodb.py @@ -54,15 +54,13 @@ async def test_deploy( @only_with_juju_secrets async def test_deploy_and_relate_mongodb(ops_test: OpsTest, cloud_name: str): """Test the relation with MongoDB and database accessibility.""" - await asyncio.gather( - ops_test.model.deploy( - MONGODB[cloud_name], - channel="6/edge", - application_name=MONGODB[cloud_name], - num_units=1, - series="jammy", - trust=True, - ) + await ops_test.model.deploy( + MONGODB[cloud_name], + channel="8/edge", + application_name=MONGODB[cloud_name], + num_units=1, + series="noble", + trust=True, ) 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" From e2af393e01abcfbc2719d91ce9b7ed2255dab798 Mon Sep 17 00:00:00 2001 From: Neha Oudin Date: Fri, 25 Sep 2026 10:25:51 +0200 Subject: [PATCH 2/2] Wait for active status --- tests/integration/test_mongodb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_mongodb.py b/tests/integration/test_mongodb.py index 90436e46..e46f73b5 100644 --- a/tests/integration/test_mongodb.py +++ b/tests/integration/test_mongodb.py @@ -64,9 +64,12 @@ 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" + + await ops_test.model.wait_for_idle( + apps=[DATA_INTEGRATOR, MONGODB[cloud_name]], status="active" + ) # check if secrets are used on Juju3 assert await check_secrets_usage_matching_juju_version(