@@ -184,14 +184,12 @@ func TestControlPlane(t *testing.T) {
184184 g .Expect (fd ).To (BeNil ())
185185 })
186186
187- t .Run ("ControlPlane returns infra error " , func (t * testing.T ) {
187+ t .Run ("ControlPlane returns error when getting infra resources " , func (t * testing.T ) {
188188 g := NewWithT (t )
189189 cluster := clusterv1.Cluster {
190190 Status : clusterv1.ClusterStatus {
191191 FailureDomains : clusterv1.FailureDomains {
192- "one" : failureDomain (true ),
193- "two" : failureDomain (true ),
194- "three" : failureDomain (true ),
192+ "one" : failureDomain (true ),
195193 },
196194 },
197195 }
@@ -213,7 +211,7 @@ func TestControlPlane(t *testing.T) {
213211 g .Expect (err ).To (HaveOccurred ())
214212 })
215213
216- t .Run ("When infra and bootstrap config is exists" , func (t * testing.T ) {
214+ t .Run ("When infra and bootstrap config exists" , func (t * testing.T ) {
217215 g := NewWithT (t )
218216 ns , err := env .CreateNamespace (ctx , "test-machine-watches" )
219217 kcp := & controlplanev1.KubeadmControlPlane {
@@ -583,8 +581,9 @@ func TestMachineWithDeleteAnnotation(t *testing.T) {
583581 }
584582
585583 g := NewWithT (t )
586- annotedMachines := c .MachineWithDeleteAnnotation (machines )
587- g .Expect (annotedMachines ).NotTo (BeNil ())
584+ annotatedMachines := c .MachineWithDeleteAnnotation (machines )
585+ g .Expect (annotatedMachines ).NotTo (BeNil ())
586+ g .Expect (annotatedMachines .Len ()).To (BeEquivalentTo (2 ))
588587 })
589588}
590589
0 commit comments