From c630efaf98012ff0960d651823ddf872f12514ec Mon Sep 17 00:00:00 2001 From: Bartlomiej Gmerek Date: Thu, 12 Dec 2024 13:32:44 +0100 Subject: [PATCH] Fixes e2e tests --- terraform/main.tf | 1 + tests/integration/juju_helper.py | 1 + tests/integration/nms_helper.py | 2 +- tests/integration/test_integration.py | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index a2cf344..15954a2 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -16,6 +16,7 @@ module "sdcore" { source = "git::https://github.com/canonical/terraform-juju-sdcore-k8s//modules/sdcore-k8s" model = juju_model.sdcore.name + nms_revision = 786 depends_on = [module.sdcore-router] } diff --git a/tests/integration/juju_helper.py b/tests/integration/juju_helper.py index 5d4172d..2ab6ed0 100644 --- a/tests/integration/juju_helper.py +++ b/tests/integration/juju_helper.py @@ -44,6 +44,7 @@ def juju_wait_for_active_idle(model_name: str, timeout: int, time_idle: int = 10 logger.info("Deployment is ready!") logger.info(check_output(["juju", "status"]).decode()) return + logger.info(check_output(["juju", "status"]).decode()) raise TimeoutError("Timed out waiting for Juju model to be ready!") diff --git a/tests/integration/nms_helper.py b/tests/integration/nms_helper.py index 3082d66..6004351 100644 --- a/tests/integration/nms_helper.py +++ b/tests/integration/nms_helper.py @@ -51,7 +51,7 @@ "site-info": { "site-name": "demo", "plmn": {"mcc": "001", "mnc": "01"}, - "gNodeBs": [{"name": "demo-gnb1", "tac": 1}], + "gNodeBs": [{"name": "ran-gnbsim-gnbsim", "tac": 1}], "upf": {"upf-name": "upf-external", "upf-port": "8805"}, }, } diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index c72a68a..da55929 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -42,7 +42,6 @@ def setup_class(cls): async def test_given_sdcore_terraform_module_when_deploy_then_status_is_active(self): self._deploy_sdcore() juju_helper.juju_wait_for_active_idle(model_name=SDCORE_MODEL_NAME, timeout=900) - juju_helper.juju_wait_for_active_idle(model_name=RAN_MODEL_NAME, timeout=300) @pytest.mark.abort_on_fail async def test_given_sdcore_bundle_and_gnbsim_deployed_when_start_simulation_then_simulation_success_status_is_true( # noqa: E501 @@ -55,6 +54,7 @@ async def test_given_sdcore_bundle_and_gnbsim_deployed_when_start_simulation_the if not username or not password: raise Exception("NMS credentials not found.") configure_sdcore(username, password) + juju_helper.juju_wait_for_active_idle(model_name=RAN_MODEL_NAME, timeout=300) action_output = juju_helper.juju_run_action( model_name=RAN_MODEL_NAME, application_name="gnbsim",