@@ -36,7 +36,7 @@ import (
36
36
"sigs.k8s.io/controller-runtime/pkg/client"
37
37
)
38
38
39
- var _ = Describe ("Workload cluster creation" , func () {
39
+ var _ = FDescribe ("Workload cluster creation" , func () {
40
40
var (
41
41
specName = "create-workload-cluster"
42
42
namespace * corev1.Namespace
@@ -114,6 +114,24 @@ var _ = Describe("Workload cluster creation", func() {
114
114
ControlPlane : client .ObjectKeyFromObject (result .ControlPlane ),
115
115
}, e2eConfig .GetIntervals (specName , "wait-control-plane" )... )
116
116
117
+ WaitForClusterReady (ctx , WaitForClusterReadyInput {
118
+ Getter : bootstrapClusterProxy .GetClient (),
119
+ Name : result .Cluster .Name ,
120
+ Namespace : result .Cluster .Namespace ,
121
+ }, e2eConfig .GetIntervals (specName , "wait-cluster" )... )
122
+
123
+ By ("Fetching all Machines" )
124
+ machineList := GetMachinesByCluster (ctx , GetMachinesByClusterInput {
125
+ Lister : bootstrapClusterProxy .GetClient (),
126
+ ClusterName : result .Cluster .Name ,
127
+ Namespace : result .Cluster .Namespace ,
128
+ })
129
+ Expect (machineList .Items ).ShouldNot (BeEmpty (), "There must be at least one Machine" )
130
+ machinesNames := []string {}
131
+ for _ , machine := range machineList .Items {
132
+ machinesNames = append (machinesNames , machine .Name )
133
+ }
134
+
117
135
By ("Upgrading to next boostrap/controlplane provider version" )
118
136
UpgradeManagementCluster (ctx , clusterctl.UpgradeManagementClusterAndWaitInput {
119
137
ClusterProxy : bootstrapClusterProxy ,
@@ -128,6 +146,26 @@ var _ = Describe("Workload cluster creation", func() {
128
146
ControlPlane : client .ObjectKeyFromObject (result .ControlPlane ),
129
147
}, e2eConfig .GetIntervals (specName , "wait-control-plane" )... )
130
148
149
+ WaitForClusterReady (ctx , WaitForClusterReadyInput {
150
+ Getter : bootstrapClusterProxy .GetClient (),
151
+ Name : result .Cluster .Name ,
152
+ Namespace : result .Cluster .Namespace ,
153
+ }, e2eConfig .GetIntervals (specName , "wait-cluster" ))
154
+
155
+ By ("Verifying machine rollout did not happen" )
156
+ updatedMachineList := GetMachinesByCluster (ctx , GetMachinesByClusterInput {
157
+ Lister : bootstrapClusterProxy .GetClient (),
158
+ ClusterName : result .Cluster .Name ,
159
+ Namespace : result .Cluster .Namespace ,
160
+ })
161
+ Expect (updatedMachineList .Items ).ShouldNot (BeEmpty (), "There must be at least one Machine after provider upgrade" )
162
+ updatedMachinesNames := []string {}
163
+ for _ , machine := range updatedMachineList .Items {
164
+ updatedMachinesNames = append (updatedMachinesNames , machine .Name )
165
+ }
166
+ Expect (updatedMachinesNames ).Should (ContainElements (machinesNames ), "Machines should not have been rolled out after provider upgrade" )
167
+ Expect (len (updatedMachinesNames )).Should (Equal (len (machinesNames )), "Number of Machines should match after provider upgrade" )
168
+
131
169
By ("Scaling down control plane to 2 and workers up to 2" )
132
170
ApplyClusterTemplateAndWait (ctx , ApplyClusterTemplateAndWaitInput {
133
171
ClusterProxy : bootstrapClusterProxy ,
0 commit comments