summaryrefslogtreecommitdiffstats
path: root/tests/unit/post
diff options
context:
space:
mode:
authorzhongjun <zhong.jun@zte.com.cn>2017-09-08 17:27:26 +0800
committerzhongjun <zhong.jun@zte.com.cn>2017-09-11 17:15:03 +0800
commit81f5a26699ced0d7f254d05705e8c028471e44d1 (patch)
tree0a3162ab21c6c58e9543de5eefaab7cbfaa3ff41 /tests/unit/post
parent923bd1535dd590754c33a6a8e2a664fd07eb4227 (diff)
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 <zhong.jun@zte.com.cn>
Diffstat (limited to 'tests/unit/post')
-rw-r--r--tests/unit/post/test_post_execute.py6
1 files changed, 3 insertions, 3 deletions
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':