diff options
author | Thomas Duval <thomas.duval@orange.com> | 2016-09-01 18:26:54 +0200 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2016-09-01 18:26:54 +0200 |
commit | 9899dca1f0a2b8b6e9c5dfa96c9288dd64535d1a (patch) | |
tree | 49fa393f82b552ed1fba2dd22067c16e53443345 /moonclient/moonclient/tests.py | |
parent | 9cbb9e45a48c48e6e4d090e48c5a20367cbfb2bf (diff) |
Fix errors with Functest.
Change-Id: Iff86047633b89c5a27d56f91e78cdf1377038f5f
Diffstat (limited to 'moonclient/moonclient/tests.py')
-rw-r--r-- | moonclient/moonclient/tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py index de93dc6f..7da7d5ec 100644 --- a/moonclient/moonclient/tests.py +++ b/moonclient/moonclient/tests.py @@ -129,10 +129,13 @@ class TestsLaunch(Lister): description = "" if "auth_name" in test: username = test["auth_name"] + os.environ["OS_USERNAME"] = test["auth_name"] if "auth_password" in test: password = test["auth_password"] + os.environ["OS_PASSWORD"] = test["auth_password"] if "auth_tenant" in test: tenant = test["auth_tenant"] + os.environ["OS_TENANT_NAME"] = test["auth_tenant"] if "auth_host" in test: host = test["auth_host"] if "auth_port" in test: @@ -158,7 +161,7 @@ class TestsLaunch(Lister): data.append(data_tmp) continue data_tmp = list() - tmp_filename = os.path.join("/tmp", uuid4().hex) + tmp_filename = os.path.join("/tmp", "moon_{}.tmp".format(uuid4().hex)) tmp_filename_fd = open(tmp_filename, "w") self.log.debug("test={}".format(test)) if "command" not in test: @@ -189,6 +192,7 @@ class TestsLaunch(Lister): self.app.stdout = stdout_back result_str = open(tmp_filename, "r").read() self.logfile.write("{}".format(result_str)) + os.unlink(tmp_filename) data_tmp.append(group_name) data_tmp.append(test["name"]) if "result" in test: |