X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fosm-lcm%2Ftests%2Fintegration%2Ftest_charm.py;h=00bb26033ba5e5830bfed865833515605819bd32;hb=1123e827b6fbe6d35adc3602da7e0f3451e80755;hp=889e287735ec05942f366e512b91d92dc057f314;hpb=810002d5ecce421a50534052f79ffafaa4231a4d;p=osm%2Fdevops.git diff --git a/installers/charm/osm-lcm/tests/integration/test_charm.py b/installers/charm/osm-lcm/tests/integration/test_charm.py index 889e2877..00bb2603 100644 --- a/installers/charm/osm-lcm/tests/integration/test_charm.py +++ b/installers/charm/osm-lcm/tests/integration/test_charm.py @@ -23,6 +23,7 @@ import asyncio import logging +import shlex from pathlib import Path import pytest @@ -50,14 +51,18 @@ APPS = [KAFKA_APP, MONGO_DB_APP, ZOOKEEPER_APP, RO_APP, LCM_APP] async def test_lcm_is_deployed(ops_test: OpsTest): charm = await ops_test.build_charm(".") resources = {"lcm-image": METADATA["resources"]["lcm-image"]["upstream-source"]} + 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( ops_test.model.deploy( - charm, resources=resources, application_name=LCM_APP, series="focal" + charm, resources=resources, application_name=LCM_APP, series="jammy" ), - ops_test.model.deploy(RO_CHARM, application_name=RO_APP, channel="beta"), + # RO charm has to be deployed differently since + # bug https://github.com/juju/python-libjuju/issues/822 + # deploys different charms wrt cli + 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="stable"), + 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"), ) @@ -72,11 +77,15 @@ async def test_lcm_is_deployed(ops_test: OpsTest): logger.info("Adding relations for other components") 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) - logger.info("Adding relations") - await ops_test.model.add_relation(LCM_APP, MONGO_DB_APP) + logger.info("Adding relations for LCM") + 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) @@ -174,7 +183,9 @@ async def test_lcm_action_debug_mode_enabled(ops_test: OpsTest): @pytest.mark.abort_on_fail async def test_lcm_integration_vca(ops_test: OpsTest): await asyncio.gather( - ops_test.model.deploy(VCA_CHARM, application_name=VCA_APP, channel="beta"), + ops_test.model.deploy( + VCA_CHARM, application_name=VCA_APP, channel="latest/beta", series="jammy" + ), ) async with ops_test.fast_forward(): await ops_test.model.wait_for_idle(