Remove installer type from rally blacklist 63/61463/1
authorJuha Kosonen <juha.kosonen@nokia.com>
Tue, 28 Aug 2018 11:49:24 +0000 (14:49 +0300)
committerJuha Kosonen <juha.kosonen@nokia.com>
Tue, 28 Aug 2018 11:49:24 +0000 (14:49 +0300)
Enables utilization of blacklist also on non-OPNFV environments since
there is no link to installer type.

JIRA: FUNCTEST-1008

Change-Id: I3eb4377af153480794c1a71c5d7ef3e78dacacb9
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
functest/opnfv_tests/openstack/rally/blacklist.txt
functest/opnfv_tests/openstack/rally/rally.py
functest/tests/unit/openstack/rally/test_rally.py

index ce929d7..0900f21 100644 (file)
@@ -2,8 +2,6 @@ scenario:
     -
         scenarios:
             - '^os-'  # all scenarios
-        installers:
-            - '.+'  # all installers
         tests:
             # Following test occasionally fails due to race condition issue on
             # quota manipulation in nova.
index bb67fc2..afaed4c 100644 (file)
@@ -188,16 +188,13 @@ class RallyBase(singlevm.VmReady2):
             with open(RallyBase.BLACKLIST_FILE, 'r') as black_list_file:
                 black_list_yaml = yaml.safe_load(black_list_file)
 
-            installer_type = env.get('INSTALLER_TYPE')
             deploy_scenario = env.get('DEPLOY_SCENARIO')
-            if (bool(installer_type) and bool(deploy_scenario) and
+            if (bool(deploy_scenario) and
                     'scenario' in black_list_yaml.keys()):
                 for item in black_list_yaml['scenario']:
                     scenarios = item['scenarios']
-                    installers = item['installers']
                     in_it = RallyBase.in_iterable_re
-                    if (in_it(deploy_scenario, scenarios) and
-                            in_it(installer_type, installers)):
+                    if in_it(deploy_scenario, scenarios):
                         tests = item['tests']
                         black_tests.extend(tests)
         except Exception:  # pylint: disable=broad-except
index b1dee91..401f043 100644 (file)
@@ -111,10 +111,8 @@ class OSRallyTesting(unittest.TestCase):
     @mock.patch('functest.opnfv_tests.openstack.rally.rally.yaml.safe_load',
                 return_value={'scenario': [
                     {'scenarios': ['test_scenario'],
-                     'installers': ['test_installer'],
                      'tests': ['test']},
                     {'scenarios': ['other_scenario'],
-                     'installers': ['test_installer'],
                      'tests': ['other_test']}]})
     def test_excl_scenario_default(self, mock_func):
         os.environ['INSTALLER_TYPE'] = 'test_installer'
@@ -126,25 +124,18 @@ class OSRallyTesting(unittest.TestCase):
     @mock.patch('functest.opnfv_tests.openstack.rally.rally.yaml.safe_load',
                 return_value={'scenario': [
                     {'scenarios': ['^os-[^-]+-featT-modeT$'],
-                     'installers': ['test_installer'],
                      'tests': ['test1']},
                     {'scenarios': ['^os-ctrlT-[^-]+-modeT$'],
-                     'installers': ['test_installer'],
                      'tests': ['test2']},
                     {'scenarios': ['^os-ctrlT-featT-[^-]+$'],
-                     'installers': ['test_installer'],
                      'tests': ['test3']},
                     {'scenarios': ['^os-'],
-                     'installers': ['test_installer'],
                      'tests': ['test4']},
                     {'scenarios': ['other_scenario'],
-                     'installers': ['test_installer'],
                      'tests': ['test0a']},
                     {'scenarios': [''],  # empty scenario
-                     'installers': ['test_installer'],
                      'tests': ['test0b']}]})
     def test_excl_scenario_regex(self, mock_func):
-        os.environ['INSTALLER_TYPE'] = 'test_installer'
         os.environ['DEPLOY_SCENARIO'] = 'os-ctrlT-featT-modeT'
         self.assertEqual(self.rally_base.excl_scenario(),
                          ['test1', 'test2', 'test3', 'test4'])
@@ -162,7 +153,6 @@ class OSRallyTesting(unittest.TestCase):
     @mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.'
                 '_migration_supported', return_value=False)
     def test_excl_func_default(self, mock_func, mock_yaml_load):
-        os.environ['INSTALLER_TYPE'] = 'test_installer'
         os.environ['DEPLOY_SCENARIO'] = 'test_scenario'
         self.assertEqual(self.rally_base.excl_func(), ['test'])
         mock_func.assert_called()