mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-08 15:41:47 +02:00
fix unit test and improve stability in e2e test
This commit is contained in:
@@ -208,8 +208,6 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
|
||||
try:
|
||||
k8s.update_config(patch_capabilities)
|
||||
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"},
|
||||
"Operator does not get in sync")
|
||||
|
||||
# changed security context of postgres container should trigger a rolling update
|
||||
k8s.wait_for_pod_failover(replica_nodes, 'spilo-role=master,' + cluster_label)
|
||||
@@ -1002,7 +1000,6 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
}
|
||||
k8s.api.custom_objects_api.patch_namespaced_custom_object(
|
||||
"acid.zalan.do", "v1", "default", "postgresqls", "acid-minimal-cluster", pg_patch_resources)
|
||||
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
|
||||
|
||||
# wait for switched over
|
||||
k8s.wait_for_pod_failover(replica_nodes, 'spilo-role=master,' + cluster_label)
|
||||
@@ -1109,7 +1106,6 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
plural="postgresqls",
|
||||
name="acid-minimal-cluster",
|
||||
body=patch_node_affinity_config)
|
||||
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
|
||||
|
||||
# node affinity change should cause replica to relocate from replica node to master node due to node affinity requirement
|
||||
k8s.wait_for_pod_failover(master_nodes, 'spilo-role=replica,' + cluster_label)
|
||||
|
||||
Reference in New Issue
Block a user