From 647b74f909591329e428fcdf0b867bf23db67d95 Mon Sep 17 00:00:00 2001 From: Howard Lau Date: Sun, 1 Nov 2020 09:34:52 +0000 Subject: [PATCH] fix wrong if Signed-off-by: Howard Lau --- controllers/seaweed_controller_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/seaweed_controller_test.go b/controllers/seaweed_controller_test.go index 4c1f631..b13914b 100644 --- a/controllers/seaweed_controller_test.go +++ b/controllers/seaweed_controller_test.go @@ -64,21 +64,21 @@ var _ = Describe("Seaweed Controller", func() { Eventually(func() bool { err := k8sClient.Get(ctx, masterKey, masterSts) - return err != nil + return err == nil }, timeout, interval).Should(BeTrue()) Expect(masterSts.Spec.Replicas).ShouldNot(BeNil()) Expect(*masterSts.Spec.Replicas).Should(Equal(seaweed.Spec.Master.Replicas)) Eventually(func() bool { err := k8sClient.Get(ctx, volumeKey, volumeSts) - return err != nil + return err == nil }, timeout, interval).Should(BeTrue()) Expect(volumeSts.Spec.Replicas).ShouldNot(BeNil()) Expect(*volumeSts.Spec.Replicas).Should(Equal(seaweed.Spec.Volume.Replicas)) Eventually(func() bool { err := k8sClient.Get(ctx, filerKey, filerSts) - return err != nil + return err == nil }, timeout, interval).Should(BeTrue()) Expect(filerSts.Spec.Replicas).ShouldNot(BeNil()) Expect(*filerSts.Spec.Replicas).Should(Equal(seaweed.Spec.Filer.Replicas))