diff options
-rw-r--r-- | functest/opnfv_tests/openstack/rally/blacklist.txt | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/rally.py | 7 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 10 | ||||
-rw-r--r-- | functest/tests/unit/openstack/rally/test_rally.py | 10 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_tempest.py | 3 | ||||
-rw-r--r-- | upper-constraints.txt | 2 |
6 files changed, 6 insertions, 28 deletions
diff --git a/functest/opnfv_tests/openstack/rally/blacklist.txt b/functest/opnfv_tests/openstack/rally/blacklist.txt index ce929d733..0900f21c1 100644 --- a/functest/opnfv_tests/openstack/rally/blacklist.txt +++ b/functest/opnfv_tests/openstack/rally/blacklist.txt @@ -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. diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index bb67fc270..afaed4c65 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -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 diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 077834ff8..022c25523 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -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) diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py index b1dee91cb..401f043aa 100644 --- a/functest/tests/unit/openstack/rally/test_rally.py +++ b/functest/tests/unit/openstack/rally/test_rally.py @@ -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() diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py index 23dcd6c75..a542bbb25 100644 --- a/functest/tests/unit/openstack/tempest/test_tempest.py +++ b/functest/tests/unit/openstack/tempest/test_tempest.py @@ -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() diff --git a/upper-constraints.txt b/upper-constraints.txt index 9d3b0eada..2ffb034e7 100644 --- a/upper-constraints.txt +++ b/upper-constraints.txt @@ -1,6 +1,6 @@ git+https://gerrit.opnfv.org/gerrit/functest#egg=functest git+https://gerrit.opnfv.org/gerrit/releng#egg=opnfv&subdirectory=modules -git+https://gerrit.opnfv.org/gerrit/snaps#egg=snaps +git+https://gerrit.opnfv.org/gerrit/snaps@d869e27230bf390c8f4fe68f5682584d4b9dbc49#egg=snaps git+https://gerrit.opnfv.org/gerrit/barometer#egg=baro_tests git+https://gerrit.opnfv.org/gerrit/sdnvpn#egg=sdnvpn git+https://gerrit.opnfv.org/gerrit/sfc#egg=sfc |