@@ -181,14 +181,12 @@ func TestControlPlane(t *testing.T) {
181181 g .Expect (fd ).To (BeNil ())
182182 })
183183
184- t .Run ("ControlPlane returns infra error " , func (t * testing.T ) {
184+ t .Run ("ControlPlane returns error when getting infra resources " , func (t * testing.T ) {
185185 g := NewWithT (t )
186186 cluster := clusterv1.Cluster {
187187 Status : clusterv1.ClusterStatus {
188188 FailureDomains : clusterv1.FailureDomains {
189- "one" : failureDomain (true ),
190- "two" : failureDomain (true ),
191- "three" : failureDomain (true ),
189+ "one" : failureDomain (true ),
192190 },
193191 },
194192 }
@@ -210,7 +208,7 @@ func TestControlPlane(t *testing.T) {
210208 g .Expect (err ).To (HaveOccurred ())
211209 })
212210
213- t .Run ("When infra and bootstrap config is exists" , func (t * testing.T ) {
211+ t .Run ("When infra and bootstrap config exists" , func (t * testing.T ) {
214212 g := NewWithT (t )
215213 ns , err := env .CreateNamespace (ctx , "test-machine-watches" )
216214 kcp := & controlplanev1.KubeadmControlPlane {
@@ -511,8 +509,9 @@ func TestMachineWithDeleteAnnotation(t *testing.T) {
511509 }
512510
513511 g := NewWithT (t )
514- annotedMachines := c .MachineWithDeleteAnnotation (machines )
515- g .Expect (annotedMachines ).NotTo (BeNil ())
512+ annotatedMachines := c .MachineWithDeleteAnnotation (machines )
513+ g .Expect (annotatedMachines ).NotTo (BeNil ())
514+ g .Expect (annotatedMachines .Len ()).To (BeEquivalentTo (2 ))
516515 })
517516}
518517
0 commit comments