Skip iptables act/stby test based on topology set
Task: 35877
Story: 2006260
Change-Id: I53671c7e93737b0d7bc038b4dd136a179facd34a
diff --git a/octavia_tempest_plugin/common/constants.py b/octavia_tempest_plugin/common/constants.py
index 7ddcb7a..e767298 100644
--- a/octavia_tempest_plugin/common/constants.py
+++ b/octavia_tempest_plugin/common/constants.py
@@ -97,6 +97,7 @@
SORT = 'sort'
SINGLE = 'SINGLE'
ACTIVE_STANDBY = 'ACTIVE_STANDBY'
+SUPPORTED_LB_TOPOLOGIES = (SINGLE, ACTIVE_STANDBY)
# Protocols
HTTP = 'HTTP'
diff --git a/octavia_tempest_plugin/config.py b/octavia_tempest_plugin/config.py
index 11dc59f..dee2bd2 100644
--- a/octavia_tempest_plugin/config.py
+++ b/octavia_tempest_plugin/config.py
@@ -111,6 +111,10 @@
default={'amphora': 'The Octavia Amphora driver.',
'octavia': 'Deprecated alias of the Octavia Amphora '
'driver.'}),
+ cfg.StrOpt('loadbalancer_topology',
+ default=const.SINGLE,
+ choices=const.SUPPORTED_LB_TOPOLOGIES,
+ help='Load balancer topology configuration.'),
# Networking
cfg.BoolOpt('test_with_ipv6',
default=True,
diff --git a/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py b/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py
index 40418a2..97886b5 100644
--- a/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py
+++ b/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py
@@ -46,6 +46,10 @@
"or 'octavia' (alias to 'amphora', "
"deprecated) set.")
+ if CONF.load_balancer.loadbalancer_topology != const.ACTIVE_STANDBY:
+ raise cls.skipException("Configured load balancer topology is not "
+ "%s." % const.ACTIVE_STANDBY)
+
@classmethod
def resource_setup(cls):
"""Setup resources needed by the tests."""
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index 5c89676..db5e924 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -502,6 +502,7 @@
"$TEMPEST_CONFIG":
load_balancer:
check_timeout: 180
+ loadbalancer_topology: 'ACTIVE_STANDBY'
tempest_test_regex: ^octavia_tempest_plugin.tests.act_stdby_scenario.v2.test_active_standby_iptables
tox_envlist: all