aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorJuha Kosonen <juha.kosonen@nokia.com>2018-09-06 12:03:42 +0300
committerCédric Ollivier <cedric.ollivier@orange.com>2018-09-18 14:41:26 +0200
commit5d54a533d25a989dc64a2789788ff2f2fd6ad5c6 (patch)
tree47febfb01e75192c9d9f1f2727de4e25c2b1f2bc /functest/tests
parent9b941ea58c60827d563d266f7dedd0d95de3ca93 (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>
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/openstack/rally/test_rally.py10
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']