Remove installer type from tempest blacklist 67/61467/2
authorJuha Kosonen <juha.kosonen@nokia.com>
Tue, 28 Aug 2018 12:32:22 +0000 (15:32 +0300)
committerJuha Kosonen <juha.kosonen@nokia.com>
Tue, 28 Aug 2018 12:40:17 +0000 (12:40 +0000)
Enables utilization of blacklist also on non-OPNFV environments since
there is no link to installer type.

JIRA: FUNCTEST-1008

Change-Id: I3a012b8b7e7dbd049f8794dff3c9d56dcc1cadad
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
functest/opnfv_tests/openstack/tempest/tempest.py
functest/tests/unit/openstack/tempest/test_tempest.py

index 4f8002e..542ed9e 100644 (file)
@@ -167,19 +167,15 @@ class TempestCommon(singlevm.VmReady1):
         result_file = open(self.list, 'w')
         black_tests = []
         try:
-            installer_type = env.get('INSTALLER_TYPE')
             deploy_scenario = env.get('DEPLOY_SCENARIO')
-            if bool(installer_type) * bool(deploy_scenario):
-                # if INSTALLER_TYPE and DEPLOY_SCENARIO are set we read the
-                # file
+            if bool(deploy_scenario):
+                # if DEPLOY_SCENARIO is set we read the file
                 black_list_file = open(conf_utils.TEMPEST_BLACKLIST)
                 black_list_yaml = yaml.safe_load(black_list_file)
                 black_list_file.close()
                 for item in black_list_yaml:
                     scenarios = item['scenarios']
-                    installers = item['installers']
-                    if (deploy_scenario in scenarios and
-                            installer_type in installers):
+                    if deploy_scenario in scenarios:
                         tests = item['tests']
                         for test in tests:
                             black_tests.append(test)
index 23dcd6c..a542bbb 100644 (file)
@@ -116,7 +116,6 @@ class OSTempestTesting(unittest.TestCase):
             mock.patch.object(self.tempestcommon, 'read_file',
                               return_value=['test1', 'test2']):
             conf_utils.TEMPEST_BLACKLIST = Exception
-            os.environ['INSTALLER_TYPE'] = 'installer_type'
             os.environ['DEPLOY_SCENARIO'] = 'deploy_scenario'
             self.tempestcommon.apply_tempest_blacklist()
             obj = mock_open()
@@ -132,7 +131,6 @@ class OSTempestTesting(unittest.TestCase):
     @mock.patch("os.path.exists", return_value=True)
     def test_apply_blacklist_default(self, *args):
         item_dict = {'scenarios': ['deploy_scenario'],
-                     'installers': ['installer_type'],
                      'tests': ['test2']}
         with mock.patch('six.moves.builtins.open',
                         mock.mock_open()) as mock_open, \
@@ -140,7 +138,6 @@ class OSTempestTesting(unittest.TestCase):
                               return_value=['test1', 'test2']), \
             mock.patch('functest.opnfv_tests.openstack.tempest.tempest.'
                        'yaml.safe_load', return_value=item_dict):
-            os.environ['INSTALLER_TYPE'] = 'installer_type'
             os.environ['DEPLOY_SCENARIO'] = 'deploy_scenario'
             self.tempestcommon.apply_tempest_blacklist()
             obj = mock_open()