Skip to content

Commit

Permalink
Fixes e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmerold committed Dec 12, 2024
1 parent 9594ad7 commit c630efa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
1 change: 1 addition & 0 deletions tests/integration/juju_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/nms_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down

0 comments on commit c630efa

Please sign in to comment.