diff options
author | Juha Kosonen <juha.kosonen@nokia.com> | 2018-09-06 12:03:42 +0300 |
---|---|---|
committer | Juha Kosonen <juha.kosonen@nokia.com> | 2018-09-20 09:14:53 +0300 |
commit | 84a71b109377e2c42327ad4418157c50b97fccca (patch) | |
tree | a9777a9bf91dee10eddda2e8cfa1624bef953006 /functest/tests/unit | |
parent | 0bd86756d5eb660bc9493a90a557aaff96d4dd17 (diff) |
Add support for Rally OpenStack CI test cases
Include Neutron rally-jobs.
Change-Id: Ic1122962bd7d876d179729640a8a321bc36442d8
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
(cherry picked from commit 5d54a533d25a989dc64a2789788ff2f2fd6ad5c6)
Diffstat (limited to 'functest/tests/unit')
-rw-r--r-- | functest/tests/unit/openstack/rally/test_rally.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py index d89ebd634..22ddb1cc5 100644 --- a/functest/tests/unit/openstack/rally/test_rally.py +++ b/functest/tests/unit/openstack/rally/test_rally.py @@ -71,7 +71,7 @@ class OSRallyTesting(unittest.TestCase): @mock.patch('functest.opnfv_tests.openstack.rally.rally.os.path.exists') @mock.patch('functest.opnfv_tests.openstack.rally.rally.os.makedirs') @mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.' - '_apply_blacklist') + 'apply_blacklist') def test_prepare_test_list_missing_temp_dir( self, mock_method, mock_os_makedirs, mock_path_exists): mock_path_exists.side_effect = self.check_temp_dir @@ -153,10 +153,13 @@ class OSRallyTesting(unittest.TestCase): {'functions': ['no_migration'], 'tests': ['test']}]}) @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): + @mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.' + '_network_trunk_supported', return_value=False) + def test_excl_func_default(self, mock_trunk, mock_func, mock_yaml_load): os.environ['DEPLOY_SCENARIO'] = 'test_scenario' self.assertEqual(self.rally_base.excl_func(), ['test']) mock_func.assert_called() + mock_trunk.assert_called() mock_yaml_load.assert_called() @mock.patch('six.moves.builtins.open', side_effect=Exception) @@ -263,8 +266,7 @@ class OSRallyTesting(unittest.TestCase): with self.assertRaises(Exception): self.rally_base.prepare_run() - @mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.' - 'get_external_network') + @mock.patch('functest.opnfv_tests.openstack.rally.rally.os.path.exists') def test_prepare_run_flavor_alt_creation_failed(self, *args): # pylint: disable=unused-argument self.rally_base.TESTS = ['test1', 'test2'] |