@@ -94,23 +94,14 @@ func commonchecks(client *rancher.Client, cluster *management.Cluster) {
94
94
By ("downgrading the chart version" , func () {
95
95
helpers .DowngradeProviderChart (downgradedVersion )
96
96
})
97
+
97
98
configNodeGroups := * cluster .EKSConfig .NodeGroups
98
99
initialNodeCount := * configNodeGroups [0 ].DesiredSize
99
- var upgradeSuccessful bool
100
100
101
101
By ("making a change(scaling nodegroup up) to the cluster to validate functionality after chart downgrade" , func () {
102
102
var err error
103
- cluster , err = helper .ScaleNodeGroup (cluster , client , initialNodeCount + increaseBy , false , true )
103
+ cluster , err = helper .ScaleNodeGroup (cluster , client , initialNodeCount + increaseBy , true , true )
104
104
Expect (err ).To (BeNil ())
105
-
106
- // We do not use WaitClusterToBeUpgraded because it has been flaky here and times out
107
- Eventually (func () bool {
108
- configNodeGroups = * cluster .EKSConfig .NodeGroups
109
- for i := range configNodeGroups {
110
- upgradeSuccessful = * configNodeGroups [i ].DesiredSize == initialNodeCount + increaseBy
111
- }
112
- return upgradeSuccessful
113
- }, tools .SetTimeout (15 * time .Minute ), 10 * time .Second ).Should (BeTrue ())
114
105
})
115
106
116
107
By ("uninstalling the operator chart" , func () {
@@ -134,11 +125,14 @@ func commonchecks(client *rancher.Client, cluster *management.Cluster) {
134
125
Eventually (func () bool {
135
126
GinkgoLogr .Info ("Waiting for the node count change to appear in EKSStatus.UpstreamSpec ..." )
136
127
Expect (err ).To (BeNil ())
137
- upstreamNodeGroups := * cluster .EKSStatus .UpstreamSpec .NodeGroups
138
- for i := range upstreamNodeGroups {
139
- upgradeSuccessful = * upstreamNodeGroups [i ].DesiredSize == initialNodeCount
128
+ cluster , err = client .Management .Cluster .ByID (cluster .ID )
129
+ Expect (err ).To (BeNil ())
130
+ for _ , ng := range * cluster .EKSStatus .UpstreamSpec .NodeGroups {
131
+ if * ng .DesiredSize != initialNodeCount {
132
+ return false
133
+ }
140
134
}
141
- return upgradeSuccessful
135
+ return true
142
136
}, tools .SetTimeout (15 * time .Minute ), 10 * time .Second ).Should (BeTrue ())
143
137
144
138
})
0 commit comments