Skip to content

Commit 8fc4b9b

Browse files
authored
on PVC when_scaled:retain check pod count, too (#2415)
* on PVC when_scaled:retain check pod count and wait for replica label
1 parent 36389b2 commit 8fc4b9b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

e2e/tests/test_e2e.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,11 +1254,13 @@ def test_persistent_volume_claim_retention_policy(self):
12541254
k8s.api.custom_objects_api.patch_namespaced_custom_object(
12551255
'acid.zalan.do', 'v1', 'default', 'postgresqls', 'acid-minimal-cluster', pg_patch_scale_down_instances)
12561256
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"},"Operator does not get in sync")
1257+
self.eventuallyEqual(lambda: k8s.count_running_pods(), 1, "Scale down to 1 failed")
12571258
self.eventuallyEqual(lambda: k8s.count_pvcs_with_label(cluster_label), 2, "PVCs is deleted when scaled down")
12581259

12591260
k8s.api.custom_objects_api.patch_namespaced_custom_object(
12601261
'acid.zalan.do', 'v1', 'default', 'postgresqls', 'acid-minimal-cluster', pg_patch_scale_up_instances)
12611262
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"},"Operator does not get in sync")
1263+
k8s.wait_for_pod_start('spilo-role=replica,' + cluster_label)
12621264
self.eventuallyEqual(lambda: k8s.count_pvcs_with_label(cluster_label), 2, "PVCs is not equal to number of instances")
12631265

12641266
@timeout_decorator.timeout(TEST_TIMEOUT_SEC)

0 commit comments

Comments
 (0)