Module: check_mk
Branch: master
Commit: fe81ac1433910e3e7d058bdd162b63e9e850cabc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe81ac1433910e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jun 22 18:20:40 2017 +0200
tests: suppress dd stderr when writing a file
Change-Id: I7dcfda998335a15fd40ad0d6d622164ed3e864df
---
tests/livestatus/test_liveproxyd.py | 1 -
tests/testlib/__init__.py | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/livestatus/test_liveproxyd.py b/tests/livestatus/test_liveproxyd.py
index 8ce6584..043330d 100644
--- a/tests/livestatus/test_liveproxyd.py
+++ b/tests/livestatus/test_liveproxyd.py
@@ -173,7 +173,6 @@ def test_large_number_of_sites(default_cfg, site):
site.execute(["cmk", "-O"])
_change_liveproxyd_sites(site, liveproxyd_sites)
-
live = livestatus.MultiSiteConnection(livestatus_api_sites)
assert live.dead_sites() == {}
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 767364d..006b33f 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -277,7 +277,8 @@ class Site(object):
def write_file(self, rel_path, content):
if not self._is_running_as_site_user():
p = self.execute(["dd", "of=%s/%s" % (self.root,
rel_path)],
- stdout=subprocess.PIPE, stdin=subprocess.PIPE)
+ stdout=subprocess.PIPE, stdin=subprocess.PIPE,
+ stderr=open(os.devnull, "w"))
p.communicate(content)
if p.wait() != 0:
raise Exception("Failed to write file %s. Exit-Code: %d" %
(rel_path, p.wait()))