Skip to content

Commit

Permalink
for upgrade-consistency and upgrade-consistency-sharded-tls tests, we…
Browse files Browse the repository at this point in the history
… also need to rename compare files in addition to update of run file content
  • Loading branch information
ptankov committed Nov 21, 2024
1 parent 12dcce1 commit bb9bd4d
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 5
generation: 3
labels:
app.kubernetes.io/component: cfg
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 7
generation: 5
labels:
app.kubernetes.io/component: cfg
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 3
generation: 7
labels:
app.kubernetes.io/component: cfg
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 3
generation: 7
labels:
app.kubernetes.io/component: cfg
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 5
generation: 3
labels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 7
generation: 5
labels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 3
generation: 7
labels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 3
generation: 7
labels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
Expand Down
34 changes: 17 additions & 17 deletions e2e-tests/upgrade-consistency-sharded-tls/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ main() {
kubectl_bin apply -f "$conf_dir/client_with_tls.yml"
deploy_cmctl

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

desc 'check if Pod started'
Expand All @@ -51,14 +51,14 @@ main() {
compare_generation "3" "statefulset" "${CLUSTER}-cfg"

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

desc 'test 1.17.0'
desc 'test 1.18.0'
kubectl_bin patch psmdb "${CLUSTER}" --type=merge --patch '{
"spec": {"crVersion":"1.17.0"}
"spec": {"crVersion":"1.18.0"}
}'
# Wait for at least one reconciliation
sleep 20
Expand All @@ -80,14 +80,14 @@ main() {
compare_generation "5" "statefulset" "${CLUSTER}-cfg"

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

desc 'test 1.18.0'
desc 'test 1.19.0'
kubectl_bin patch psmdb "${CLUSTER}" --type=merge --patch '{
"spec": {"crVersion":"1.18.0"}
"spec": {"crVersion":"1.19.0"}
}'
# Wait for at least one reconciliation
sleep 20
Expand All @@ -109,10 +109,10 @@ main() {
compare_generation "7" "statefulset" "${CLUSTER}-cfg"

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

destroy "$namespace"

Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/upgrade-consistency/conf/some-name-rs0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: PerconaServerMongoDB
metadata:
name: some-name
spec:
crVersion: 1.16.2
crVersion: 1.17.0
#platform: openshift
image:
imagePullPolicy: Always
Expand Down

0 comments on commit bb9bd4d

Please sign in to comment.