Skip to content

Commit

Permalink
After deleting the Service, confirm that it's gone
Browse files Browse the repository at this point in the history
  • Loading branch information
kimorris27 committed Jan 29, 2024
1 parent 6d3042d commit 08ea7fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e/adminapi_delete_managedresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ var _ = Describe("[Admin API] Delete managed resource action", func() {
err := clients.Kubernetes.CoreV1().Services("default").Delete(ctx, "test", metav1.DeleteOptions{})
g.Expect((err == nil || kerrors.IsNotFound(err))).To(BeTrue(), "expect Service to be deleted")
}).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed())

By("confirming that the k8s loadbalancer service is gone")
Eventually(func(g Gomega, ctx context.Context) {
_, err := clients.Kubernetes.CoreV1().Services("default").Get(ctx, "test", metav1.GetOptions{})
g.Expect(kerrors.IsNotFound(err)).To(BeTrue())
}).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed())
}()

// wait for ingress IP to be assigned as this indicate the service is ready
Expand Down

0 comments on commit 08ea7fa

Please sign in to comment.