Module: check_mk
Branch: master
Commit: 8936ec32bec68e87cbf456d953b48799e8629858
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8936ec32bec68e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 1 09:49:36 2019 +0100
Capture pretty verbose outpu produced by tests
Change-Id: I00fa1396f65fefe22aa8b5c41146517723ddc290
---
tests/integration/cmk_base/test_data_sources.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/integration/cmk_base/test_data_sources.py
b/tests/integration/cmk_base/test_data_sources.py
index a6e1aa6..e1a4401 100644
--- a/tests/integration/cmk_base/test_data_sources.py
+++ b/tests/integration/cmk_base/test_data_sources.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# pylint: disable=redefined-outer-name
# These tests verify the behaviour of the Check_MK base methods
# that do the actual checking/discovery/inventory work. Especially
# the default caching and handling of global options affecting the
@@ -319,28 +320,31 @@ def test_mode_check_explicit_host_no_cache(test_cfg, monkeypatch):
assert _counter_run == 2
-def test_mode_dump_agent_explicit_host(test_cfg, monkeypatch):
+def test_mode_dump_agent_explicit_host(test_cfg, monkeypatch, capsys):
_patch_data_source_run(monkeypatch)
cmk_base.modes.check_mk.mode_dump_agent("ds-test-host1")
assert _counter_run == 2
+ assert "<<<check_mk>>>" in capsys.readouterr().out
-def test_mode_dump_agent_explicit_host_cache(test_cfg, monkeypatch):
+def test_mode_dump_agent_explicit_host_cache(test_cfg, monkeypatch, capsys):
try:
_patch_data_source_run(monkeypatch, _may_use_cache_file=True,
_use_outdated_cache_file=True)
cmk_base.modes.check_mk.option_cache()
cmk_base.modes.check_mk.mode_dump_agent("ds-test-host1")
assert _counter_run == 2
+ assert "<<<check_mk>>>" in capsys.readouterr().out
finally:
# TODO: Can't the mode clean this up on it's own?
cmk_base.data_sources.abstract.DataSource.set_use_outdated_cache_file(False)
-def test_mode_dump_agent_explicit_host_no_cache(test_cfg, monkeypatch):
+def test_mode_dump_agent_explicit_host_no_cache(test_cfg, monkeypatch, capsys):
_patch_data_source_run(monkeypatch, _no_cache=True, _max_cachefile_age=0)
cmk_base.modes.check_mk.option_no_cache() # --no-cache
cmk_base.modes.check_mk.mode_dump_agent("ds-test-host1")
assert _counter_run == 2
+ assert "<<<check_mk>>>" in capsys.readouterr().out
@pytest.mark.parametrize(("scan"), [