aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/openstack/rally
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-11-13 04:20:47 +0000
committerLinda Wang <wangwulin@huawei.com>2017-11-13 09:36:46 +0000
commit98311932d448f21a872ac0cd5f46258ecddd89e0 (patch)
tree89ae58d9274aa17c8ab4788ff12861d687ffbaa9 /functest/tests/unit/openstack/rally
parent9e72ad1edd88aada55a0328cd72d4941c4e6fc60 (diff)
Move rally and tempest out of functest-core
JIRA: FUNCTEST-889 Change-Id: I96776da7af50b2c33c34dd731b5500b891d263d6 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/tests/unit/openstack/rally')
-rw-r--r--functest/tests/unit/openstack/rally/test_rally.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py
index 6a85536d..83f0c86a 100644
--- a/functest/tests/unit/openstack/rally/test_rally.py
+++ b/functest/tests/unit/openstack/rally/test_rally.py
@@ -405,6 +405,8 @@ class OSRallyTesting(unittest.TestCase):
self.assertTrue(creator1.clean.called)
self.assertTrue(creator2.clean.called)
+ @mock.patch('functest.opnfv_tests.openstack.tempest.conf_utils.'
+ 'create_rally_deployment')
@mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.'
'_prepare_env')
@mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.'
@@ -417,9 +419,18 @@ class OSRallyTesting(unittest.TestCase):
self.assertEqual(self.rally_base.run(), testcase.TestCase.EX_OK)
map(lambda m: m.assert_called(), args)
+ @mock.patch('functest.opnfv_tests.openstack.tempest.conf_utils.'
+ 'create_rally_deployment', side_effect=Exception)
+ def test_run_exception_create_rally_dep(self, mock_create_rally_dep):
+ self.assertEqual(self.rally_base.run(), testcase.TestCase.EX_RUN_ERROR)
+ mock_create_rally_dep.assert_called()
+
@mock.patch('functest.opnfv_tests.openstack.rally.rally.RallyBase.'
'_prepare_env', side_effect=Exception)
- def test_run_exception(self, mock_prep_env):
+ @mock.patch('functest.opnfv_tests.openstack.tempest.conf_utils.'
+ 'create_rally_deployment', return_value=mock.Mock())
+ def test_run_exception_prepare_env(self, mock_create_rally_dep,
+ mock_prep_env):
self.assertEqual(self.rally_base.run(), testcase.TestCase.EX_RUN_ERROR)
mock_prep_env.assert_called()