add unit test for inherited annotations

This commit is contained in:
Felix Kunde
2020-12-07 17:23:49 +01:00
parent 621c81fc52
commit 1ac2decdea
4 changed files with 136 additions and 6 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ class K8s:
for svc in svcs:
for key, value in annotations.items():
if not svc.metadata.annotations or key not in svc.metadata.annotations or svc.metadata.annotations[key] != value:
print("Expected key {} not found in annotations {}".format(key, svc.metadata.annotations))
print("Expected key {} not found in service annotations {}".format(key, svc.metadata.annotations))
return False
return True
@@ -126,7 +126,7 @@ class K8s:
for sset in ssets:
for key, value in annotations.items():
if key not in sset.metadata.annotations or sset.metadata.annotations[key] != value:
print("Expected key {} not found in annotations {}".format(key, sset.metadata.annotations))
print("Expected key {} not found in statefulset annotations {}".format(key, sset.metadata.annotations))
return False
return True
-2
View File
@@ -877,8 +877,6 @@ class EndToEndTestCase(unittest.TestCase):
self.eventuallyTrue(lambda: k8s.check_statefulset_annotations(cluster_label, annotations), "Annotations missing")
self.eventuallyTrue(lambda: k8s.check_statefulset_annotations(cluster_label, annotations), "Annotations missing")
@timeout_decorator.timeout(TEST_TIMEOUT_SEC)
@unittest.skip("Skipping this test until fixed")
def test_zzz_taint_based_eviction(self):