Skip to content

Commit

Permalink
fix: resource consist ut, get svc just after creation might return 404 (
Browse files Browse the repository at this point in the history
  • Loading branch information
WeichengWang1 authored Oct 19, 2023
1 parent d5c4230 commit a88ef1e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,13 @@ var _ = Describe("resource-consist-controller", func() {
Expect(err).NotTo(HaveOccurred())
Eventually(func() bool {
svcTmp := corev1.Service{}
Expect(mgr.GetClient().Get(context.TODO(), types.NamespacedName{
err = mgr.GetClient().Get(context.TODO(), types.NamespacedName{
Name: svc0.Name,
Namespace: svc0.Namespace,
}, &svcTmp)).Should(BeNil())
}, &svcTmp)
if err != nil {
return false
}
for _, flz := range svcTmp.GetFinalizers() {
if flz == cleanFinalizerPrefix+svc0.GetName() {
return true
Expand Down

0 comments on commit a88ef1e

Please sign in to comment.