Skip to content

Commit

Permalink
K8SPSMDB-886 - Update upgrade-consistency-sharded test
Browse files Browse the repository at this point in the history
  • Loading branch information
tplavcic committed Oct 10, 2023
1 parent cf2fecb commit cbccd9e
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions e2e-tests/upgrade-consistency-sharded/run
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ main() {
kubectl_bin apply -f "${conf_dir}/client.yml" \
-f "${conf_dir}/secrets.yml"

desc "create first PSMDB cluster 1.13.0 $CLUSTER"
desc "create first PSMDB cluster 1.14.0 $CLUSTER"
apply_cluster "$test_dir/conf/${CLUSTER}.yml"

desc 'check if Pod started'
Expand All @@ -25,14 +25,14 @@ main() {
wait_cluster_consistency ${CLUSTER}

desc 'check if service and statefulset created with expected config'
compare_kubectl service/${CLUSTER}-rs0 "-1130"
compare_kubectl service/${CLUSTER}-cfg "-1130"
compare_kubectl statefulset/${CLUSTER}-rs0 "-1130"
compare_kubectl statefulset/${CLUSTER}-cfg "-1130"
compare_kubectl service/${CLUSTER}-rs0 "-1140"
compare_kubectl service/${CLUSTER}-cfg "-1140"
compare_kubectl statefulset/${CLUSTER}-rs0 "-1140"
compare_kubectl statefulset/${CLUSTER}-cfg "-1140"

desc 'test 1.14.0'
desc 'test 1.15.0'
kubectl_bin patch psmdb "${CLUSTER}" --type=merge --patch '{
"spec": {"crVersion":"1.14.0"}
"spec": {"crVersion":"1.15.0"}
}'
# Wait for at least one reconciliation
sleep 10
Expand All @@ -42,14 +42,14 @@ main() {
wait_for_running "${CLUSTER}-mongos" 3

desc 'check if service and statefulset created with expected config'
compare_kubectl service/${CLUSTER}-rs0 "-1140"
compare_kubectl service/${CLUSTER}-cfg "-1140"
compare_kubectl statefulset/${CLUSTER}-rs0 "-1140"
compare_kubectl statefulset/${CLUSTER}-cfg "-1140"
compare_kubectl service/${CLUSTER}-rs0 "-1150"
compare_kubectl service/${CLUSTER}-cfg "-1150"
compare_kubectl statefulset/${CLUSTER}-rs0 "-1150"
compare_kubectl statefulset/${CLUSTER}-cfg "-1150"

desc 'test 1.15.0'
desc 'test 1.16.0'
kubectl_bin patch psmdb "${CLUSTER}" --type=merge --patch '{
"spec": {"crVersion":"1.15.0"}
"spec": {"crVersion":"1.16.0"}
}'
# Wait for at least one reconciliation
sleep 10
Expand All @@ -59,10 +59,10 @@ main() {
wait_for_running "${CLUSTER}-mongos" 3

desc 'check if service and statefulset created with expected config'
compare_kubectl service/${CLUSTER}-rs0 "-1150"
compare_kubectl service/${CLUSTER}-cfg "-1150"
compare_kubectl statefulset/${CLUSTER}-rs0 "-1150"
compare_kubectl statefulset/${CLUSTER}-cfg "-1150"
compare_kubectl service/${CLUSTER}-rs0 "-1160"
compare_kubectl service/${CLUSTER}-cfg "-1160"
compare_kubectl statefulset/${CLUSTER}-rs0 "-1160"
compare_kubectl statefulset/${CLUSTER}-cfg "-1160"

destroy $namespace

Expand Down

0 comments on commit cbccd9e

Please sign in to comment.