Skip to content

Commit 5697b6a

Browse files
committed
Fix unit test
Signed-off-by: Lubron Zhan <[email protected]>
1 parent 12a35d3 commit 5697b6a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

controllers/machine/machine_controller_intg_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ func intgTestMachineController() {
9393
})
9494
It("Corresponding Endpoints should be created", func() {
9595
ep := &corev1.Endpoints{}
96-
Eventually(func() error {
97-
return ctx.Client.Get(ctx.Context, client.ObjectKey{Name: cluster.Namespace + "-" + cluster.Name + "-control-plane", Namespace: cluster.Namespace}, ep)
98-
}).Should(Succeed())
9996
Eventually(func() int {
97+
err := ctx.Client.Get(ctx.Context, client.ObjectKey{Name: cluster.Namespace + "-" + cluster.Name + "-control-plane", Namespace: cluster.Namespace}, ep)
98+
if err != nil {
99+
return 0
100+
}
100101
if len(ep.Subsets) == 0 {
101102
return 0
102103
}

0 commit comments

Comments
 (0)