Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Lubron Zhan <[email protected]>
  • Loading branch information
lubronzhan committed Mar 13, 2024
1 parent 12a35d3 commit 5697b6a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/machine/machine_controller_intg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ func intgTestMachineController() {
})
It("Corresponding Endpoints should be created", func() {
ep := &corev1.Endpoints{}
Eventually(func() error {
return ctx.Client.Get(ctx.Context, client.ObjectKey{Name: cluster.Namespace + "-" + cluster.Name + "-control-plane", Namespace: cluster.Namespace}, ep)
}).Should(Succeed())
Eventually(func() int {
err := ctx.Client.Get(ctx.Context, client.ObjectKey{Name: cluster.Namespace + "-" + cluster.Name + "-control-plane", Namespace: cluster.Namespace}, ep)
if err != nil {
return 0
}
if len(ep.Subsets) == 0 {
return 0
}
Expand Down

0 comments on commit 5697b6a

Please sign in to comment.