Merge "PROD-36050 Add option to skip switching to proposed branch"
diff --git a/tcp_tests/tests/system/conftest.py b/tcp_tests/tests/system/conftest.py
index 0627ede..2ea36cf 100644
--- a/tcp_tests/tests/system/conftest.py
+++ b/tcp_tests/tests/system/conftest.py
@@ -80,3 +80,11 @@
     # tempest
     'tempest_actions'
 ])
+
+
+def pytest_addoption(parser):
+    parser.addoption("--dont-switch-to-proposed",
+                     action="store_true",
+                     help="Skips switching Jenkins on cluster-under-test to "
+                          "the proposed branch before the applying "
+                          "the MCP updates")
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index 6957f64..240b481 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -67,7 +67,16 @@
 
 
 @pytest.fixture(scope='class')
-def switch_to_proposed_pipelines(reclass_actions, salt_actions):
+def dont_switch_to_proposed(request):
+    return request.config.getoption("--dont-switch-to-proposed")
+
+
+@pytest.fixture(scope='class')
+def switch_to_proposed_pipelines(reclass_actions, salt_actions,
+                                 dont_switch_to_proposed):
+    if dont_switch_to_proposed:
+        return True
+
     reclass = reclass_actions
     proposed_repo = "http://mirror.mirantis.com/update/proposed/"
     repo_param = "parameters._param.linux_system_repo_update_url"
@@ -111,6 +120,7 @@
         reclass_actions.commit(
           "[from TCP-QA] Add galera_clustercheck_password")
     else:
+
         LOG.info("Skipping WA for Galera Clustercheck Password")