updates.mirantis in other tag
Related-Prod: PROD-36426
Change-Id: I395277f390762555793a2bf5b94c763356e9c4ec
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index 2b4309a..51d29d0 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -226,11 +226,15 @@
@pytest.fixture(scope='class')
-def switch_to_staging_updates_mirantis_repo(reclass_actions, salt_actions):
+def switch_to_staging_updates_mirantis_repo(update_to_tag,
+ reclass_actions,
+ salt_actions):
version_param = "parameters._param.updates_mirantis_version"
infra_yml = "cluster/*/infra/init.yml"
-
current_version = reclass_actions.get_key(version_param, infra_yml)
+
+ if update_to_tag is not None:
+ reclass_actions.add_key(version_param, update_to_tag, infra_yml)
if current_version == 'staging':
LOG.info("updates.mirantis.com already set to 'staging', skipping")
return
@@ -238,6 +242,11 @@
LOG.info("updates.mirantis.com is not enabled, "
"skipping /staging repo pillar")
return
+ if current_version is not None:
+ LOG.info("updates.mirantis.com is other tag "
+ "skipping /staging repo pillar")
+ salt_actions.run_state("*", "saltutil.refresh_pillar")
+ return
LOG.info("Switch to updates.mirantis.com/staging repo")
reclass_actions.add_key(version_param, 'staging', infra_yml)