Skip to content

Commit 3ca5f27

Browse files
committed
e2e: fix sync-replication
1 parent 3042a3e commit 3ca5f27

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

stackgres-k8s/e2e/spec/sync-replication

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ e2e_test_install() {
2929
deploy_curl_pod "$CLUSTER_NAMESPACE"
3030

3131
wait_pods_running "$CLUSTER_NAMESPACE" "4"
32-
wait_cluster "$CLUSTER_NAME" "$CLUSTER_NAMESPACE"
32+
SWITCHOVER_TO_FIRST=true wait_cluster "$CLUSTER_NAME" "$CLUSTER_NAMESPACE"
3333
}
3434

3535
e2e_test() {
@@ -180,23 +180,23 @@ check_old_primary_in_ha_group_not_in_replicas_service_after_changing_role() {
180180
kubectl delete pod -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME-2"
181181
create_or_replace_cluster "$CLUSTER_NAME" "$CLUSTER_NAMESPACE" "3" \
182182
--set cluster.replication.mode=sync \
183-
--set cluster.replication.role=ha \
183+
--set cluster.replication.role=ha-read \
184184
--set cluster.replication.syncInstances=2 \
185185
--set cluster.replication.groups[0].instances=1 \
186-
--set cluster.replication.groups[0].role=ha-read \
186+
--set cluster.replication.groups[0].role=ha \
187187
--set cluster.pods.scheduling.nodeSelector."$NODE_LABEL_KEY=null"
188188
# This is not a typo, helm does not support removing a property so we need to repeat the change in order to make it work :facepalm:
189189
create_or_replace_cluster "$CLUSTER_NAME" "$CLUSTER_NAMESPACE" "3" \
190190
--set cluster.replication.mode=sync \
191-
--set cluster.replication.role=ha \
191+
--set cluster.replication.role=ha-read \
192192
--set cluster.replication.syncInstances=2 \
193193
--set cluster.replication.groups[0].instances=1 \
194-
--set cluster.replication.groups[0].role=ha-read \
194+
--set cluster.replication.groups[0].role=ha \
195195
--set cluster.pods.scheduling.nodeSelector."$NODE_LABEL_KEY=null"
196196
wait_until delete_pod_and_wait_scheduled "$CLUSTER_NAMESPACE" "$CLUSTER_NAME-0"
197197
wait_until delete_pod_and_wait_scheduled "$CLUSTER_NAMESPACE" "$CLUSTER_NAME-1"
198198
wait_pods_running "$CLUSTER_NAMESPACE" "3"
199-
wait_cluster "$CLUSTER_NAME" "$CLUSTER_NAMESPACE"
199+
SWITCHOVER_TO_FIRST=true wait_cluster "$CLUSTER_NAME" "$CLUSTER_NAMESPACE"
200200
local RESULT EXIT_CODE
201201
try_function wait_until eval 'check_pod_ip_not_exposed_by_service "$CLUSTER_NAMESPACE" "$CLUSTER_NAME-0" "$CLUSTER_NAME-replicas"'
202202
if "$RESULT"

0 commit comments

Comments
 (0)