Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions tests/integration/test_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,22 @@ 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"

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(
Expand Down
Loading