Assert on the unit status before any relations/configurations take place.
"""
charm = await ops_test.build_charm(".")
- await ops_test.model.deploy(charm, application_name=VCA_APP)
+ await ops_test.model.deploy(charm, application_name=VCA_APP, series="jammy")
async with ops_test.fast_forward():
await ops_test.model.wait_for_idle(
apps=[VCA_APP],
@pytest.mark.abort_on_fail
async def test_vca_integration_lcm(ops_test: OpsTest):
- lcm_deploy_cmd = f"juju deploy {LCM_CHARM} {LCM_APP} --resource lcm-image=opensourcemano/lcm:testing-daily --channel=latest/beta --series=focal"
- ro_deploy_cmd = f"juju deploy {RO_CHARM} {RO_APP} --resource ro-image=opensourcemano/ro:testing-daily --channel=latest/beta --series=focal"
+ lcm_deploy_cmd = f"juju deploy {LCM_CHARM} {LCM_APP} --resource lcm-image=opensourcemano/lcm:testing-daily --channel=latest/beta --series=jammy"
+ ro_deploy_cmd = f"juju deploy {RO_CHARM} {RO_APP} --resource ro-image=opensourcemano/ro:testing-daily --channel=latest/beta --series=jammy"
await asyncio.gather(
# LCM and RO charms have to be deployed differently since
ops_test.run(*shlex.split(lcm_deploy_cmd), check=True),
ops_test.run(*shlex.split(ro_deploy_cmd), check=True),
ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
- ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+ ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
)
async with ops_test.fast_forward():
await ops_test.model.wait_for_idle(apps=[MONGO_DB_APP], status="active")
logger.info("Adding relations")
await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
- await ops_test.model.add_relation(RO_APP, MONGO_DB_APP)
+ await ops_test.model.add_relation(
+ "{}:mongodb".format(RO_APP), "{}:database".format(MONGO_DB_APP)
+ )
await ops_test.model.add_relation(RO_APP, KAFKA_APP)
# LCM specific
- await ops_test.model.add_relation(LCM_APP, MONGO_DB_APP)
+ await ops_test.model.add_relation(
+ "{}:mongodb".format(LCM_APP), "{}:database".format(MONGO_DB_APP)
+ )
await ops_test.model.add_relation(LCM_APP, KAFKA_APP)
await ops_test.model.add_relation(LCM_APP, RO_APP)
@pytest.mark.abort_on_fail
async def test_vca_integration_mon(ops_test: OpsTest):
- keystone_deploy_cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image=opensourcemano/keystone:testing-daily"
- mon_deploy_cmd = f"juju deploy {MON_CHARM} {MON_APP} --resource mon-image=opensourcemano/mon:testing-daily --channel=latest/beta --series=focal"
+ keystone_image = "opensourcemano/keystone:testing-daily"
+ keystone_deploy_cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image={keystone_image} --channel=latest/beta --series jammy"
+ mon_deploy_cmd = f"juju deploy {MON_CHARM} {MON_APP} --resource mon-image=opensourcemano/mon:testing-daily --channel=latest/beta --series=jammy"
await asyncio.gather(
# MON charm has to be deployed differently since
# bug https://github.com/juju/python-libjuju/issues/820
logger.info("Adding relations")
await ops_test.model.add_relation(MARIADB_APP, KEYSTONE_APP)
# MON specific
- await ops_test.model.add_relation(MON_APP, MONGO_DB_APP)
+ await ops_test.model.add_relation(
+ "{}:mongodb".format(MON_APP), "{}:database".format(MONGO_DB_APP)
+ )
await ops_test.model.add_relation(MON_APP, KAFKA_APP)
await ops_test.model.add_relation(MON_APP, KEYSTONE_APP)
await ops_test.model.add_relation(MON_APP, PROMETHEUS_APP)