Skip to content

Commit a3acc41

Browse files
Address feedback
1 parent a956f3e commit a3acc41

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

internal/controllers/machinedeployment/machinedeployment_rollout_rollingupdate_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
991991
canUpdateAnswer: map[string]bool{
992992
"ms1": true,
993993
},
994-
expectMoveFromMS: []string{"ms1"},
994+
expectMoveFromMS: []string{"ms1"},
995995
expectScaleIntents: map[string]int32{
996996
// "ms2": 3, +3 replica using maxSurge dropped, oldMS is scaling down
997997
},
@@ -1029,7 +1029,7 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
10291029
},
10301030
{
10311031
name: "When moving replicas from oldMS to newMS, drop usage of MaxSurge in the newMS scale up intent when there newMS is scaling from a previous reconcile (maxSurge 3, maxUnavailable 1)",
1032-
md: createMD("v6", 6, withRollingUpdateStrategy(3, 1)),
1032+
md: createMD("v2", 6, withRollingUpdateStrategy(3, 1)),
10331033
newMS: createMS("ms2", "v2", 3, withStatusReplicas(2), withStatusUpToDateReplicas(2), withStatusAvailableReplicas(2)), // scaling from a previous reconcile
10341034
oldMS: []*clusterv1.MachineSet{
10351035
createMS("ms1", "v1", 3),
@@ -1054,7 +1054,7 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
10541054
canUpdateAnswer: map[string]bool{
10551055
"ms1": true,
10561056
},
1057-
expectMoveFromMS: []string{"ms1"},
1057+
expectMoveFromMS: []string{"ms1"},
10581058
expectScaleIntents: map[string]int32{
10591059
// "ms2": 6, +3 replicas from maxSurge dropped, newMS is already scaling up
10601060
},
@@ -1068,8 +1068,8 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
10681068
},
10691069
machines: []*clusterv1.Machine{
10701070
createM("m1", "ms1", "v1"),
1071-
createM("m2", "ms2", "v1"),
1072-
createM("m3", "ms2", "v1"),
1071+
createM("m2", "ms2", "v2"),
1072+
createM("m3", "ms2", "v2"),
10731073
},
10741074
scaleIntents: map[string]int32{
10751075
"ms2": 3, // +1 => MD expect 3, has currently 3 replicas, +1 replica it is using maxSurge
@@ -1083,7 +1083,7 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
10831083
canUpdateAnswer: map[string]bool{
10841084
"ms1": true,
10851085
},
1086-
expectMoveFromMS: []string{"ms1"},
1086+
expectMoveFromMS: []string{"ms1"},
10871087
expectScaleIntents: map[string]int32{
10881088
// "ms2": 1, +1 replica using maxSurge dropped, there is a machine updating in place
10891089
},
@@ -1112,7 +1112,7 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
11121112
canUpdateAnswer: map[string]bool{
11131113
"ms1": true,
11141114
},
1115-
expectMoveFromMS: []string{"ms1"},
1115+
expectMoveFromMS: []string{"ms1"},
11161116
expectScaleIntents: map[string]int32{
11171117
// "ms2": 1, +1 replica using maxSurge dropped, there is a machine updating in place
11181118
},
@@ -1126,8 +1126,8 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
11261126
},
11271127
machines: []*clusterv1.Machine{
11281128
createM("m1", "ms1", "v1"),
1129-
createM("m2", "ms2", "v1"),
1130-
createM("m3", "ms2", "v1"),
1129+
createM("m2", "ms2", "v2"),
1130+
createM("m3", "ms2", "v2"),
11311131
},
11321132
scaleIntents: map[string]int32{
11331133
"ms2": 3, // +1 => MD expect 3, has currently 3 replicas, +1 replica it is using maxSurge
@@ -1141,7 +1141,7 @@ func TestReconcileInPlaceUpdateIntent(t *testing.T) {
11411141
canUpdateAnswer: map[string]bool{
11421142
"ms1": true,
11431143
},
1144-
expectMoveFromMS: []string{"ms1"},
1144+
expectMoveFromMS: []string{"ms1"},
11451145
expectScaleIntents: map[string]int32{
11461146
// "ms2": 1, +1 replica using maxSurge dropped, there is a machine updating in place
11471147
},

0 commit comments

Comments
 (0)