mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 06:43:48 +02:00
on PVC when_scaled:retain check pod count, too (#2415)
* on PVC when_scaled:retain check pod count and wait for replica label
This commit is contained in:
@@ -1254,11 +1254,13 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
k8s.api.custom_objects_api.patch_namespaced_custom_object(
|
||||
'acid.zalan.do', 'v1', 'default', 'postgresqls', 'acid-minimal-cluster', pg_patch_scale_down_instances)
|
||||
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"},"Operator does not get in sync")
|
||||
self.eventuallyEqual(lambda: k8s.count_running_pods(), 1, "Scale down to 1 failed")
|
||||
self.eventuallyEqual(lambda: k8s.count_pvcs_with_label(cluster_label), 2, "PVCs is deleted when scaled down")
|
||||
|
||||
k8s.api.custom_objects_api.patch_namespaced_custom_object(
|
||||
'acid.zalan.do', 'v1', 'default', 'postgresqls', 'acid-minimal-cluster', pg_patch_scale_up_instances)
|
||||
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"},"Operator does not get in sync")
|
||||
k8s.wait_for_pod_start('spilo-role=replica,' + cluster_label)
|
||||
self.eventuallyEqual(lambda: k8s.count_pvcs_with_label(cluster_label), 2, "PVCs is not equal to number of instances")
|
||||
|
||||
@timeout_decorator.timeout(TEST_TIMEOUT_SEC)
|
||||
|
||||
Reference in New Issue
Block a user