Module: check_mk
Branch: master
Commit: e748d5d931b539b5ea0b3b051524bf46f563fdc0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e748d5d931b539…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 11 12:00:54 2019 +0100
Re-enable kubernetes V1ClusterRole patch test
Change-Id: Idfc2e0277f94cd95cf05f1bed716b5e7cb1115e3
---
.../cmk/special_agents/test_agent_kubernetes.py | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/tests/integration/cmk/special_agents/test_agent_kubernetes.py
b/tests/integration/cmk/special_agents/test_agent_kubernetes.py
index 1f3dad3..e312bab 100644
--- a/tests/integration/cmk/special_agents/test_agent_kubernetes.py
+++ b/tests/integration/cmk/special_agents/test_agent_kubernetes.py
@@ -1,15 +1,14 @@
-import pytest
+import pytest # type: ignore
from kubernetes.client.models import V1ClusterRole
def test_v1_clusterrole_without_rules():
- # try:
- # role = V1ClusterRole(rules=None)
- # except ValueError:
- # pytest.fail(
- # "It must be possible to instantiate a V1ClusterRole without explicit
roles. "
- # "This is assured by patch
0020-kubernetes-allow-empty-rules-in-clusterrole.dif.")
-
- # assert role.rules == []
- pass
+ try:
+ role = V1ClusterRole(rules=None)
+ except ValueError:
+ pytest.fail(
+ "It must be possible to instantiate a V1ClusterRole without explicit
roles. "
+ "This is assured by patch
0020-kubernetes-allow-empty-rules-in-clusterrole.dif.")
+
+ assert role.rules == []