Module: check_mk
Branch: master
Commit: 5bd5d70a296363bd0059583ce126842f91e0d71e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bd5d70a296363…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Feb 7 13:31:30 2018 +0100
Check tests: Add some conditions to what constitutes a proper perfvalue key
Change-Id: I36f5fe58485587cae7c888afe306722f6036601b
---
tests/checks/checktestlib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/checks/checktestlib.py b/tests/checks/checktestlib.py
index 86691f0..dbabbcc 100644
--- a/tests/checks/checktestlib.py
+++ b/tests/checks/checktestlib.py
@@ -29,6 +29,9 @@ class PerfValue(Tuploid):
# in what kind of values are allowed as metric names.
# I'm not too sure unicode should be allowed, either.
assert type(key) in [str, unicode]
+ assert " " not in key # This leads to serious errors
+ assert "=" not in key # The parsing around this is way too funky and
doesn't work properly
+ assert "\n" not in key
self.key = key
# NOTE: The CMC as well as all other Nagios-compatible cores do accept a