Skip to content

Commit 89dda1a

Browse files
committed
Refactor ignored_annotations e2e change
1 parent 50b6902 commit 89dda1a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

e2e/tests/test_e2e.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -909,25 +909,35 @@ def test_ignored_annotations(self):
909909
'''
910910
k8s = self.k8s
911911

912-
annotation_patch = {
913-
"metadata": {
914-
"annotations": {
915-
"k8s-status": "healthy"
916-
},
917-
}
918-
}
919912

920913
try:
914+
patch_config_ignored_annotations = {
915+
"data": {
916+
"ignored_annotations": "k8s-status",
917+
}
918+
}
919+
k8s.update_config(patch_config_ignored_annotations)
920+
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
921+
921922
sts = k8s.api.apps_v1.read_namespaced_stateful_set('acid-minimal-cluster', 'default')
923+
svc = k8s.api.core_v1.read_namespaced_service('acid-minimal-cluster', 'default')
924+
925+
annotation_patch = {
926+
"metadata": {
927+
"annotations": {
928+
"k8s-status": "healthy"
929+
},
930+
}
931+
}
932+
922933
old_sts_creation_timestamp = sts.metadata.creation_timestamp
923934
k8s.api.apps_v1.patch_namespaced_stateful_set(sts.metadata.name, sts.metadata.namespace, annotation_patch)
924-
svc = k8s.api.core_v1.read_namespaced_service('acid-minimal-cluster', 'default')
925935
old_svc_creation_timestamp = svc.metadata.creation_timestamp
926936
k8s.api.core_v1.patch_namespaced_service(svc.metadata.name, svc.metadata.namespace, annotation_patch)
927-
937+
928938
patch_config_ignored_annotations = {
929939
"data": {
930-
"ignored_annotations": "k8s-status",
940+
"ignored_annotations": "k8s-status, foo",
931941
}
932942
}
933943
k8s.update_config(patch_config_ignored_annotations)

0 commit comments

Comments
 (0)