Merge "Adds option to skip specific tests"
This commit is contained in:
commit
69e4b69909
@ -101,11 +101,13 @@ IntegrationTestGroup = [
|
||||
default=False,
|
||||
help="Skip all functional tests"),
|
||||
cfg.ListOpt('skip_functional_test_list',
|
||||
help="List of functional test class names to skip "
|
||||
"ex. AutoscalingGroupTest, CreateStackTest"),
|
||||
help="List of functional test class or class.method "
|
||||
"names to skip ex. AutoscalingGroupTest,"
|
||||
"InstanceGroupBasicTest.test_size_updates_work"),
|
||||
cfg.ListOpt('skip_scenario_test_list',
|
||||
help="List of scenario test class names to skip "
|
||||
"ex. NeutronLoadBalancerTest,"),
|
||||
help="List of scenario test class or class.method "
|
||||
"names to skip ex. NeutronLoadBalancerTest, "
|
||||
"CeilometerAlarmTest.test_alarm"),
|
||||
cfg.ListOpt('skip_test_stack_action_list',
|
||||
help="List of stack actions in tests to skip "
|
||||
"ex. ABANDON, ADOPT, SUSPEND, RESUME"),
|
||||
|
@ -21,8 +21,11 @@ class FunctionalTestsBase(test.HeatIntegrationTest):
|
||||
self.client = self.orchestration_client
|
||||
|
||||
def check_skip_test(self):
|
||||
test_name = self.__class__.__name__
|
||||
test_skipped = (self.conf.skip_functional_test_list and
|
||||
test_name in self.conf.skip_functional_test_list)
|
||||
test_cls_name = self.__class__.__name__
|
||||
test_method_name = '.'.join([test_cls_name, self._testMethodName])
|
||||
test_skipped = (self.conf.skip_functional_test_list and (
|
||||
test_cls_name in self.conf.skip_functional_test_list or
|
||||
test_method_name in self.conf.skip_functional_test_list))
|
||||
|
||||
if self.conf.skip_functional_tests or test_skipped:
|
||||
self.skipTest('Test disabled in conf, skipping')
|
||||
|
@ -84,12 +84,13 @@
|
||||
# Skip all functional tests (boolean value)
|
||||
#skip_functional_tests = false
|
||||
|
||||
# List of functional test class names to skip ex. AutoscalingGroupTest,
|
||||
# CreateStackTest (list value)
|
||||
# List of functional test class or class.method names to skip ex.
|
||||
# AutoscalingGroupTest,InstanceGroupBasicTest.test_size_updates_work (list
|
||||
# value)
|
||||
#skip_functional_test_list = <None>
|
||||
|
||||
# List of scenario test class names to skip ex. NeutronLoadBalancerTest, (list
|
||||
# value)
|
||||
# List of scenario test class or class.method names to skip ex.
|
||||
# NeutronLoadBalancerTest, CeilometerAlarmTest.test_alarm (list value)
|
||||
#skip_scenario_test_list = <None>
|
||||
|
||||
# List of stack actions in tests to skip ex. ABANDON, ADOPT, SUSPEND, RESUME
|
||||
|
@ -59,8 +59,10 @@ class ScenarioTestsBase(test.HeatIntegrationTest):
|
||||
return stack_id
|
||||
|
||||
def check_skip_test(self):
|
||||
test_name = self.__class__.__name__
|
||||
test_skipped = (self.conf.skip_scenario_test_list and
|
||||
test_name in self.conf.skip_scenario_test_list)
|
||||
test_cls_name = self.__class__.__name__
|
||||
test_method_name = '.'.join([test_cls_name, self._testMethodName])
|
||||
test_skipped = (self.conf.skip_scenario_test_list and (
|
||||
test_cls_name in self.conf.skip_scenario_test_list or
|
||||
test_method_name in self.conf.skip_scenario_test_list))
|
||||
if self.conf.skip_scenario_tests or test_skipped:
|
||||
self.skipTest('Test disabled in conf, skipping')
|
||||
|
Loading…
Reference in New Issue
Block a user