Merge "Allow convergence-specific Tempest tests"
diff --git a/common/config.py b/common/config.py
index d7126c4..eddac01 100644
--- a/common/config.py
+++ b/common/config.py
@@ -140,6 +140,10 @@
cfg.ListOpt('skip_test_stack_action_list',
help="List of stack actions in tests to skip "
"ex. ABANDON, ADOPT, SUSPEND, RESUME"),
+ cfg.BoolOpt('convergence_engine_enabled',
+ default=True,
+ help="Test features that are only present for stacks with "
+ "convergence enabled."),
cfg.IntOpt('volume_size',
default=1,
help='Default size in GB for volumes created by volumes tests'),
diff --git a/common/test.py b/common/test.py
index d43dece..a6aab7e 100644
--- a/common/test.py
+++ b/common/test.py
@@ -68,6 +68,17 @@
return randbits
+def requires_convergence(test_method):
+ '''Decorator for convergence-only tests.
+
+ The decorated test will be skipped when convergence is disabled.
+ '''
+ convergence_enabled = config.CONF.heat_plugin.convergence_engine_enabled
+ skipper = testtools.skipUnless(convergence_enabled,
+ "Convergence-only tests are disabled")
+ return skipper(test_method)
+
+
class HeatIntegrationTest(testscenarios.WithScenarios,
testtools.TestCase):