summaryrefslogtreecommitdiffstats
path: root/functest/tests/unit
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-11-22 03:45:45 +0000
committerLinda Wang <wangwulin@huawei.com>2017-11-23 02:38:45 +0000
commitd7be74e6dee301327dfd6e8be2171b811648d919 (patch)
tree1e7bfda87d1ae05d5f92050909f19e1a88517bee /functest/tests/unit
parent01a5192428eb99afcb94047e6faa54e1d57114d1 (diff)
Remove openstack utils calls in rally and tempest
Mainly, update "rally deployment create --file=rally_conf.json" to "rally deployment create --fromenv" Change-Id: I6dd4c7ea2d9d6f47dee49a4fd416e62bd557f45e Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/tests/unit')
-rw-r--r--functest/tests/unit/openstack/tempest/test_conf_utils.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py
index f20a7e93..6edbbf5d 100644
--- a/functest/tests/unit/openstack/tempest/test_conf_utils.py
+++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py
@@ -88,21 +88,12 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
msg = 'Failed to create flavor'
self.assertTrue(msg in context.exception, msg=str(context.exception))
- def _get_rally_creds(self):
- return {"type": "ExistingCloud",
- "admin": {"username": 'test_user_name',
- "password": 'test_password',
- "tenant": 'test_tenant'}}
-
- @mock.patch('functest.utils.openstack_utils.get_credentials_for_rally')
@mock.patch('functest.opnfv_tests.openstack.tempest.conf_utils'
'.logger.info')
@mock.patch('functest.utils.functest_utils.execute_command_raise')
@mock.patch('functest.utils.functest_utils.execute_command')
def test_create_rally_deployment(self, mock_exec, mock_exec_raise,
- mock_logger_info, mock_os_utils):
-
- mock_os_utils.return_value = self._get_rally_creds()
+ mock_logger_info):
conf_utils.create_rally_deployment()
@@ -112,7 +103,7 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
mock_logger_info.assert_any_call("Creating Rally environment...")
mock_exec.assert_any_call(cmd, error_msg=error_msg, verbose=False)
- cmd = "rally deployment create --file=rally_conf.json --name="
+ cmd = "rally deployment create --fromenv --name="
cmd += CONST.__getattribute__('rally_deployment_name')
error_msg = "Problem while creating Rally deployment"
mock_exec_raise.assert_any_call(cmd, error_msg=error_msg)