From ec6ffe830a470c4c6fe97e8b0b98da167fb43aa1 Mon Sep 17 00:00:00 2001 From: Bartlomiej Gmerek Date: Thu, 28 Nov 2024 10:15:05 +0100 Subject: [PATCH] Uses 1.5/edge for the tests --- terraform/integration_tests.auto.tfvars.j2 | 1 + terraform/main.tf | 18 ++++++++++-------- terraform/variables.tf | 8 +++++++- tests/integration/test_integration.py | 1 + 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/terraform/integration_tests.auto.tfvars.j2 b/terraform/integration_tests.auto.tfvars.j2 index d1d1d26..81c935f 100644 --- a/terraform/integration_tests.auto.tfvars.j2 +++ b/terraform/integration_tests.auto.tfvars.j2 @@ -1 +1,2 @@ sdcore_model_name = "{{ sdcore_model_name }}" +ran_model_name = "{{ ran_model_name }}" diff --git a/terraform/main.tf b/terraform/main.tf index ed02272..1ecd53a 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -9,25 +9,27 @@ module "sdcore-router" { source = "git::https://github.com/canonical/sdcore-router-k8s-operator//terraform?ref=v1.5" model = juju_model.sdcore.name + channel = "1.5/edge" depends_on = [juju_model.sdcore] } module "sdcore" { source = "git::https://github.com/canonical/terraform-juju-sdcore-k8s//modules/sdcore-k8s?ref=v1.5" - model = juju_model.sdcore.name - - depends_on = [module.sdcore-router] + model = juju_model.sdcore.name + sdcore_channel = "1.5/edge" + depends_on = [module.sdcore-router] } resource "juju_model" "ran-simulator" { - name = "ran" + name = var.ran_model_name } module "gnbsim" { source = "git::https://github.com/canonical/sdcore-gnbsim-k8s-operator//terraform?ref=v1.5" model = juju_model.ran-simulator.name + channel = "1.5/edge" depends_on = [module.sdcore-router] } @@ -64,10 +66,10 @@ resource "juju_integration" "gnbsim-nms" { } module "cos" { - source = "git::https://github.com/canonical/terraform-juju-sdcore//modules/external/cos-lite" - model_name = "cos-lite" - deploy_cos_configuration = true - cos_configuration_config = { + source = "git::https://github.com/canonical/terraform-juju-sdcore//modules/external/cos-lite" + model_name = "cos-lite" + deploy_cos_configuration = true + cos_configuration_config = { git_repo = "https://github.com/canonical/sdcore-cos-configuration" git_branch = "main" grafana_dashboards_path = "grafana_dashboards/sdcore/" diff --git a/terraform/variables.tf b/terraform/variables.tf index 2efa6df..87b6f2c 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -2,7 +2,13 @@ # See LICENSE file for licensing details. variable "sdcore_model_name" { - description = "Name of Juju model to deploy application to." + description = "Name of Juju model to deploy SD-Core applications to." type = string default = "sdcore" } + +variable "ran_model_name" { + description = "Name of Juju model to deploy RAN simulator to." + type = string + default = "ran" +} diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index 424c02c..573e374 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -117,6 +117,7 @@ def _generate_tfvars_file(): template = jinja2_environment.get_template(f"{TFVARS_FILE}.j2") content = template.render( sdcore_model_name=SDCORE_MODEL_NAME, + ran_model_name=RAN_MODEL_NAME, ) with open(f"{TERRAFORM_DIR}/{TFVARS_FILE}", mode="w") as tfvars: tfvars.write(content)