diff options
author | Zane Bitter <zbitter@redhat.com> | 2017-10-05 14:19:32 -0400 |
---|---|---|
committer | Zane Bitter <zbitter@redhat.com> | 2017-10-05 14:19:32 -0400 |
commit | dfd34a00f3bb741b475906ad961e0d3aace076e0 (patch) | |
tree | 02f4dac1bb3a996a9572fbe24c2e2df8725d9a1f /heat_integrationtests/common | |
parent | 163d85a3cabfef9954c0326cd50c4774c8f302fc (diff) | |
download | heat-dfd34a00f3bb741b475906ad961e0d3aace076e0.tar.gz |
Allow convergence-specific Tempest tests
Add a "convergence_engine_enabled" configuration option to the functional
tests' Tempest plugin. The option is enabled by default, but can be
disabled by setting the DISABLE_CONVERGENCE environment variable to "true"
when running prepare_test_env.sh, so that if convergence is disabled in
devstack it will also be disabled in Tempest.
This will allow us to write functional tests for convergence-specific (or
non-convergence-specific) behaviours.
Change-Id: If3a37de75467d50af10582215e16611e59a4ad06
Diffstat (limited to 'heat_integrationtests/common')
-rw-r--r-- | heat_integrationtests/common/config.py | 4 | ||||
-rw-r--r-- | heat_integrationtests/common/test.py | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/heat_integrationtests/common/config.py b/heat_integrationtests/common/config.py index d7126c402..eddac013b 100644 --- a/heat_integrationtests/common/config.py +++ b/heat_integrationtests/common/config.py @@ -140,6 +140,10 @@ HeatGroup = [ 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/heat_integrationtests/common/test.py b/heat_integrationtests/common/test.py index d43deceb2..a6aab7e61 100644 --- a/heat_integrationtests/common/test.py +++ b/heat_integrationtests/common/test.py @@ -68,6 +68,17 @@ def rand_name(name=''): 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): |