Add k8s keepalived failover test
Rewrite openstack_actions to remove hardware dependency from it.
Rewrite conformance method to allow more flexibility.
Add timeout after restarting keepalived workaround because
sometimes it did not have time to go into MASTER state before
test starts.
Change-Id: I668844f91f4a8fb473e199977f1ebe6ca7ddc35a
Related-PROD: PROD-20878
diff --git a/tcp_tests/tests/system/test_failover_nodes.py b/tcp_tests/tests/system/test_failover_nodes.py
index 0abada9..87a7de8 100644
--- a/tcp_tests/tests/system/test_failover_nodes.py
+++ b/tcp_tests/tests/system/test_failover_nodes.py
@@ -24,8 +24,8 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
- def test_warm_shutdown_ctl01_node(self, underlay, openstack_deployed,
- openstack_actions, show_step):
+ def test_warm_shutdown_ctl01_node(self, underlay, hardware, show_step,
+ openstack_deployed, openstack_actions):
"""Test warm shutdown ctl01
Scenario:
@@ -43,7 +43,7 @@
show_step(3)
# STEP #4
show_step(4)
- openstack_actions.warm_shutdown_openstack_nodes('ctl01')
+ hardware.warm_shutdown_nodes(underlay, 'ctl01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -52,7 +52,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
- def test_restart_ctl01_node(self, underlay, openstack_deployed,
+ def test_restart_ctl01_node(self, underlay, hardware, openstack_deployed,
openstack_actions, show_step):
"""Test restart ctl01
@@ -72,7 +72,7 @@
# STEP #4
show_step(4)
- openstack_actions.warm_restart_nodes('ctl01')
+ hardware.warm_restart_nodes(underlay, 'ctl01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -82,7 +82,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
def test_warm_shutdown_cmp01_node(self, underlay, openstack_deployed,
- openstack_actions, show_step):
+ hardware, openstack_actions, show_step):
"""Test warm shutdown cmp01
Scenario:
@@ -101,7 +101,7 @@
# STEP #4
show_step(4)
- openstack_actions.warm_shutdown_openstack_nodes('cmp01')
+ hardware.warm_shutdown_nodes(underlay, 'cmp01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -111,7 +111,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
def test_restart_cmp01_node(self, underlay, openstack_deployed,
- openstack_actions, show_step):
+ openstack_actions, show_step, hardware):
"""Test restart cmp01
Scenario:
@@ -130,7 +130,7 @@
# STEP #4
show_step(4)
- openstack_actions.warm_restart_nodes('cmp01')
+ hardware.warm_restart_nodes(underlay, 'cmp01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -140,7 +140,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.sl_deployed)
- def test_restart_mon01_node(self, openstack_actions,
+ def test_restart_mon01_node(self, openstack_actions, hardware, underlay,
sl_os_deployed, show_step):
"""Test restart mon01
@@ -172,7 +172,7 @@
before_result if 'passed' not in test['outcome']]
# STEP #5
show_step(5)
- openstack_actions.warm_restart_nodes('mon01')
+ hardware.warm_restart_nodes(underlay, 'mon01')
# STEP #6
show_step(6)
sl_os_deployed.check_prometheus_targets(mon_nodes)
@@ -191,9 +191,8 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.sl_deployed)
- def test_warm_shutdown_mon01_node(self, openstack_actions,
- sl_os_deployed,
- show_step):
+ def test_warm_shutdown_mon01_node(self, underlay, hardware, sl_os_deployed,
+ openstack_actions, show_step):
"""Test warm shutdown mon01
Scenario:
@@ -223,7 +222,7 @@
before_result if 'passed' not in test['outcome']]
# STEP #5
show_step(5)
- openstack_actions.warm_shutdown_openstack_nodes('mon01')
+ hardware.warm_shutdown_nodes(underlay, 'mon01')
# STEP #6
show_step(6)
# Run SL component tetsts
@@ -239,7 +238,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.sl_deployed)
- def test_restart_mon_with_vip(self, sl_os_deployed,
+ def test_restart_mon_with_vip(self, underlay, hardware, sl_os_deployed,
openstack_actions, salt_actions,
common_services_actions, show_step):
"""Test restart mon with VIP
@@ -286,7 +285,7 @@
# STEP #6
show_step(6)
- openstack_actions.warm_restart_nodes(minion_vip)
+ hardware.warm_restart_nodes(underlay, minion_vip)
# STEP #7
show_step(7)
@@ -314,7 +313,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.openstack_deployed)
- def test_restart_ctl_with_vip(self, underlay, openstack_deployed,
+ def test_restart_ctl_with_vip(self, underlay, hardware, openstack_deployed,
openstack_actions, salt_actions,
common_services_actions, show_step):
"""Test restart clt with VIP
@@ -350,7 +349,7 @@
# STEP #5
show_step(5)
- openstack_actions.warm_restart_nodes(minion_vip)
+ hardware.warm_restart_nodes(underlay, minion_vip)
# STEP #6
show_step(6)