Module: check_mk
Branch: master
Commit: bad5c6048ed3774e4bdc1d10a8277dac6781c5ac
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bad5c6048ed377…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Nov 10 08:14:19 2017 +0100
Tentative revert, trying to get CI back in shape.
Not sure if this is the real reason, but CI complained starting with the
first of the 2 commits:
Revert "df: Discovery test for the behaviour of the include volume name rule"
This reverts commit a604ad9f22efce8695f40631dc6579f02731bb51.
Revert "df: Rudimentary test for discovery"
This reverts commit 7a2f088b80a20367bfae7a62ee9eb40dbe255b5c.
If things are still broken after this revert, we can re-apply the patches.
---
tests/checks/test_df.py | 41 -----------------------------------------
1 file changed, 41 deletions(-)
diff --git a/tests/checks/test_df.py b/tests/checks/test_df.py
deleted file mode 100644
index 13bf982..0000000
--- a/tests/checks/test_df.py
+++ /dev/null
@@ -1,41 +0,0 @@
-import pytest
-import pprint
-import sys
-
-pytestmark = pytest.mark.check
-
-(a)pytest.mark.parametrize("info,result,include_volume_name"name", [
- ([], [], False),
- ([[u'/dev/sda4',
- u'ext4',
- u'143786696',
- u'101645524',
- u'34814148',
- u'75%',
- u'/'],
- [u'[df_inodes_start]'],
- [u'/dev/sda4', u'ext4', u'9142272', u'1654272',
u'7488000', u'19%', u'/'],
- [u'[df_inodes_end]']], [(u'/', {})], False),
- ([[u'/dev/sda4',
- u'ext4',
- u'143786696',
- u'101645524',
- u'34814148',
- u'75%',
- u'/'],
- [u'[df_inodes_start]'],
- [u'/dev/sda4', u'ext4', u'9142272', u'1654272',
u'7488000', u'19%', u'/'],
- [u'[df_inodes_end]']], [(u'/dev/sda4 /', {})], True),
-])
-def test_df_discovery_with_parse(check_manager, monkeypatch, info, result,
include_volume_name):
- import cmk_base.checks
-
-# NOTE: This is the result of trying to mock the the ruleset variable itself instead of
the
-# host_extra_conf_merged function. It did not work. Maybe we can get it to work
at a later stage.
-# import cmk_base.rulesets
-# monkeypatch.setitem(cmk_base.checks._check_contexts["df"],
"inventory_df_rules",
-# [({"include_volume_name": include_volume_name}, [],
cmk_base.rulesets.ALL_HOSTS, {})])
-
- check = check_manager.get_check("df")
- monkeypatch.setitem(cmk_base.checks._check_contexts["df"],
"host_extra_conf_merged", lambda _, __: {"include_volume_name":
include_volume_name})
- assert check.run_discovery(check.run_parse(info)) == result