aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/openstack/tempest/test_tempest.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-17 21:44:44 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-17 21:54:07 +0100
commit78c0b09a2cf3a57ae5d4f8cfe67ab66ad9d8aef2 (patch)
treea3647c8149aeaa19932696dd41ffa0383846b01e /functest/tests/unit/openstack/tempest/test_tempest.py
parent82bb54e41ab0f8365ca5e1e6469860287d089a1c (diff)
Mute all rally messages
The are now printed in functest.log only. JIRA: FUNCTEST-950 Change-Id: I1fdd0e0f1be19fc5e7536326acb6a66645610696 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/openstack/tempest/test_tempest.py')
-rw-r--r--functest/tests/unit/openstack/tempest/test_tempest.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py
index 3a4851314..e2c4c975b 100644
--- a/functest/tests/unit/openstack/tempest/test_tempest.py
+++ b/functest/tests/unit/openstack/tempest/test_tempest.py
@@ -72,7 +72,7 @@ class OSTempestTesting(unittest.TestCase):
self.tempestcommon.generate_test_list()
self.assertTrue(mock_copyfile.called)
- @mock.patch('functest.utils.functest_utils.execute_command')
+ @mock.patch('subprocess.check_output')
def _test_gen_tl_mode_default(self, mode, mock_exec=None):
self.tempestcommon.mode = mode
if self.tempestcommon.mode == 'smoke':
@@ -82,12 +82,10 @@ class OSTempestTesting(unittest.TestCase):
else:
testr_mode = self.tempestcommon.mode
verifier_repo_dir = 'test_verifier_repo_dir'
- cmd = ("cd {0};"
- "testr list-tests {1} > {2};"
- "cd -;".format(verifier_repo_dir, testr_mode,
- self.tempestcommon.list))
+ cmd = "(cd {0}; testr list-tests {1} >{2} 2>/dev/null)".format(
+ verifier_repo_dir, testr_mode, self.tempestcommon.list)
self.tempestcommon.generate_test_list()
- mock_exec.assert_called_once_with(cmd)
+ mock_exec.assert_called_once_with(cmd, shell=True)
def test_gen_tl_smoke_mode(self):
self._test_gen_tl_mode_default('smoke')