From f567c1ca0ce93b38cb17bf25dae444524da9e3d1 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Sun, 15 Mar 2020 10:35:51 +0100 Subject: [PATCH] Add unittest for metric key alias --- test/test_check_http_json.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_check_http_json.py b/test/test_check_http_json.py index 6320c60..489213a 100644 --- a/test/test_check_http_json.py +++ b/test/test_check_http_json.py @@ -103,6 +103,8 @@ class UtilTest(unittest.TestCase): '{"metric": 5}', OK_CODE) self.check_data(RulesHelper().dash_m(['(*).value,s,1:5,1:5']), '[{"value": 5},{"value": 100}]', CRITICAL_CODE) + self.check_data(RulesHelper().dash_m(['metric>foobar,,1:4,1:5']), + '{"metric": 5}', WARNING_CODE) def test_unknown(self): self.check_data(RulesHelper().dash_U(['metric,0']),