From 81f5a26699ced0d7f254d05705e8c028471e44d1 Mon Sep 17 00:00:00 2001 From: zhongjun Date: Fri, 8 Sep 2017 17:27:26 +0800 Subject: Add the pytest file test_deploy.py 1.add the pytest file test_deploy.py 2.fix the tmpfile clearup issue. Change-Id: I3a7e0f9199f1bf518b332fd3e9884c8f084575ae Signed-off-by: zhongjun --- tests/unit/post/test_post_execute.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/unit/post') diff --git a/tests/unit/post/test_post_execute.py b/tests/unit/post/test_post_execute.py index d614360c..c06bc085 100644 --- a/tests/unit/post/test_post_execute.py +++ b/tests/unit/post/test_post_execute.py @@ -110,14 +110,14 @@ def openrc_conf_file_dir(data_root): ('globals.yml'), ('globals_odl.yml')]) def test__config_kolla_admin_openrc(globals_file_name, openrc_conf_file_dir, tmpdir): src_globals_file_path = os.path.join(openrc_conf_file_dir, globals_file_name) - dst_globals_file_path = os.path.join(tmpdir.dirname, 'globals.yml') + dst_globals_file_path = os.path.join(tmpdir.dirname, tmpdir.basename, 'globals.yml') shutil.copyfile(src_globals_file_path, dst_globals_file_path) src_openrc_file_path = os.path.join(openrc_conf_file_dir, 'admin-openrc.sh') - dst_openrc_file_path = os.path.join(tmpdir.dirname, 'admin-openrc.sh') + dst_openrc_file_path = os.path.join(tmpdir.dirname, tmpdir.basename, 'admin-openrc.sh') shutil.copyfile(src_openrc_file_path, dst_openrc_file_path) - _config_kolla_admin_openrc(tmpdir.dirname) + _config_kolla_admin_openrc(os.path.join(tmpdir.dirname, tmpdir.basename)) src_openrc_lines = open(src_openrc_file_path, 'r').readlines() dst_openrc_lines = open(dst_openrc_file_path, 'r').readlines() if globals_file_name == 'globals.yml': -- cgit 1.2.3-korg