diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-03-07 14:02:08 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-03-07 20:30:28 +0100 |
commit | 0174b1962464c289d777caa88c91ff2c20be910a (patch) | |
tree | 475928cf8ab88d14112ef21498ce6ab59273daa1 /functest/tests/unit/openstack/tempest/test_conf_utils.py | |
parent | d2620ae72be08f83548be81fa80a418f2250da28 (diff) |
Allow overriding tempest output dir
Change-Id: I31a5d2772bab168b3cb4e6b0713d6e95aa5b6fd7
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/openstack/tempest/test_conf_utils.py')
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index 1d5f29a2c..1c9a8aeee 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -219,7 +219,8 @@ class OSTempestConfUtilsTesting(unittest.TestCase): 'conf_utils.os.makedirs') as mock_makedirs, \ mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.shutil.copyfile') as mock_copyfile: - conf_utils.backup_tempest_config('test_conf_file') + conf_utils.backup_tempest_config( + 'test_conf_file', res_dir='test_dir') self.assertTrue(mock_makedirs.called) self.assertTrue(mock_copyfile.called) @@ -228,7 +229,8 @@ class OSTempestConfUtilsTesting(unittest.TestCase): return_value=True), \ mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.shutil.copyfile') as mock_copyfile: - conf_utils.backup_tempest_config('test_conf_file') + conf_utils.backup_tempest_config( + 'test_conf_file', res_dir='test_dir') self.assertTrue(mock_copyfile.called) def test_conf_tempest_def(self): @@ -238,7 +240,7 @@ class OSTempestConfUtilsTesting(unittest.TestCase): mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.configure_tempest_update_params')\ as mock_upd: - conf_utils.configure_tempest('test_dep_dir') + conf_utils.configure_tempest('test_dep_dir', 'test_dir') self.assertTrue(mock_upd.called) def test_gen_test_accounts_file_def(self): @@ -265,7 +267,8 @@ class OSTempestConfUtilsTesting(unittest.TestCase): return_value={'validation': {'ssh_timeout': 300}}): os.environ['OS_ENDPOINT_TYPE'] = '' conf_utils.configure_tempest_update_params( - 'test_conf_file', image_id=image_id, flavor_id=flavor_id) + 'test_conf_file', res_dir='test_dir', image_id=image_id, + flavor_id=flavor_id) mset.assert_any_call(params[0], params[1], params[2]) self.assertTrue(mread.called) self.assertTrue(mwrite.called) |