Module: check_mk
Branch: master
Commit: b1ffcbe88e21902272da6b78885e45fa53f61f90
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b1ffcbe88e2190…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Fri May 25 11:29:29 2018 +0200
Only require manpage if check generates a service
Change-Id: Iaffe10947d71ea783d868e53c8e334dff0100d0c
---
tests/unit/cmk/test_man_pages.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/unit/cmk/test_man_pages.py b/tests/unit/cmk/test_man_pages.py
index d82043b..0261974 100644
--- a/tests/unit/cmk/test_man_pages.py
+++ b/tests/unit/cmk/test_man_pages.py
@@ -130,11 +130,18 @@ def test_manpage_files():
assert len(manuals) > 1000
+def _is_pure_section_declaration(check):
+ '''return true if and only if the check never generates a
service'''
+ return (check.get('inventory_function') is None and
+ check.get('check_function') is None)
+
+
def test_find_missing_manpages():
all_check_manuals = man_pages.all_man_pages()
checks.load()
- checks_sorted = checks.check_info.items() + \
+ checks_sorted = [ (name, entry) for (name, entry) in checks.check_info.items()
+ if not _is_pure_section_declaration(entry) ] + \
[ ("check_" + name, entry) for (name, entry) in
checks.active_check_info.items() ]
checks_sorted.sort()
assert len(checks_sorted) > 1000