X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fosm-nbi%2Ftests%2Fintegration%2Ftest_charm.py;h=855517586a6d388679f330c006cbc95365f255cf;hb=1123e827b6fbe6d35adc3602da7e0f3451e80755;hp=a7146383e1bbf378eaaa57b9209977c4dbc7d525;hpb=56db64f403eaea09530d1073640eee9b36ff2caf;p=osm%2Fdevops.git diff --git a/installers/charm/osm-nbi/tests/integration/test_charm.py b/installers/charm/osm-nbi/tests/integration/test_charm.py index a7146383..85551758 100644 --- a/installers/charm/osm-nbi/tests/integration/test_charm.py +++ b/installers/charm/osm-nbi/tests/integration/test_charm.py @@ -58,10 +58,10 @@ async def test_nbi_is_deployed(ops_test: OpsTest): await asyncio.gather( ops_test.model.deploy( - charm, resources=resources, application_name=NBI_APP, series="focal" + charm, resources=resources, application_name=NBI_APP, series="jammy" ), 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(MARIADB_CHARM, application_name=MARIADB_APP, channel="stable"), ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"), ops_test.model.deploy(PROMETHEUS_CHARM, application_name=PROMETHEUS_APP, channel="stable"), @@ -69,7 +69,8 @@ async def test_nbi_is_deployed(ops_test: OpsTest): # Keystone charm has to be deployed differently since # bug https://github.com/juju/python-libjuju/issues/766 # prevents setting correctly the resources - cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image=opensourcemano/keystone:12" + keystone_image = "opensourcemano/keystone:testing-daily" + cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image={keystone_image} --channel=latest/beta --series jammy" await ops_test.run(*shlex.split(cmd), check=True) async with ops_test.fast_forward(): @@ -84,8 +85,10 @@ async def test_nbi_is_deployed(ops_test: OpsTest): await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP) await ops_test.model.add_relation(MARIADB_APP, KEYSTONE_APP) - logger.info("Adding relations") - await ops_test.model.add_relation(NBI_APP, MONGO_DB_APP) + logger.info("Adding relations for NBI") + await ops_test.model.add_relation( + "{}:mongodb".format(NBI_APP), "{}:database".format(MONGO_DB_APP) + ) await ops_test.model.add_relation(NBI_APP, KAFKA_APP) await ops_test.model.add_relation(NBI_APP, PROMETHEUS_APP) await ops_test.model.add_relation(NBI_APP, KEYSTONE_APP) @@ -181,9 +184,12 @@ async def test_nbi_action_debug_mode_enabled(ops_test: OpsTest): @pytest.mark.abort_on_fail async def test_nbi_integration_ingress(ops_test: OpsTest): - await asyncio.gather( - ops_test.model.deploy(INGRESS_CHARM, application_name=INGRESS_APP, channel="beta"), - ) + # Temporal workaround due to python-libjuju 2.9.42.2 bug fixed in + # https://github.com/juju/python-libjuju/pull/854 + # To be replaced when juju version 2.9.43 is used. + cmd = f"juju deploy {INGRESS_CHARM} {INGRESS_APP} --channel stable" + await ops_test.run(*shlex.split(cmd), check=True) + async with ops_test.fast_forward(): await ops_test.model.wait_for_idle( apps=APPS + [INGRESS_APP],