X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fvca-integrator-operator%2Ftests%2Fintegration%2Ftest_charm.py;h=8d69e7b036b0cab88028245964185e366ded7393;hb=HEAD;hp=394386e3cc3a59afe52ba31b2c5419ef77e73888;hpb=f88cb4f7140fd4e56b797deb29a41bd69c37913d;p=osm%2Fdevops.git diff --git a/installers/charm/vca-integrator-operator/tests/integration/test_charm.py b/installers/charm/vca-integrator-operator/tests/integration/test_charm.py index 394386e3..8d69e7b0 100644 --- a/installers/charm/vca-integrator-operator/tests/integration/test_charm.py +++ b/installers/charm/vca-integrator-operator/tests/integration/test_charm.py @@ -67,7 +67,7 @@ async def test_build_and_deploy(ops_test: OpsTest): 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], @@ -98,8 +98,8 @@ async def test_vca_configuration(ops_test: OpsTest): @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 @@ -108,7 +108,7 @@ async def test_vca_integration_lcm(ops_test: OpsTest): 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(): @@ -120,10 +120,14 @@ async def test_vca_integration_lcm(ops_test: OpsTest): 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) @@ -144,8 +148,9 @@ async def test_vca_integration_lcm(ops_test: OpsTest): @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 @@ -166,7 +171,9 @@ async def test_vca_integration_mon(ops_test: OpsTest): 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)