Module: check_mk
Branch: master
Commit: caadea5d5a025fa7a30da551bacc6c0b290a6cf7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=caadea5d5a025f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 13 14:52:17 2017 +0100
Fixed recently broke integration tests
Change-Id: I5609f4e59c9247fb6a7995ddd8c7919a0238c5d8
---
tests/testlib/__init__.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index a70c18e..4d90736 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -458,11 +458,11 @@ class Site(object):
# Check_MK is now the site, so all tests that somehow rely on the environment should
be
# executed this way.
def switch_to_site_user(self):
- env_vars = []
+ env_var_str = ""
if "WORKSPACE" in os.environ:
- env_vars.append("WORKSPACE=\"%s\"" %
os.environ["WORKSPACE"])
+ env_var_str = "WORKSPACE='%s' " %
os.environ["WORKSPACE"]
- cmd = subprocess.list2cmdline(env_vars + sys.argv + [ cmk_path() +
"/tests" ])
+ cmd = env_var_str + subprocess.list2cmdline(sys.argv + [ cmk_path() +
"/tests" ])
args = [ "/usr/bin/sudo", "--", "/bin/su",
"-l", self.id, "-c", cmd ]
return subprocess.call(args)