Signed-off-by: Howard Lau <howardlau1999@hotmail.com>
This commit is contained in:
Howard Lau 2020-11-01 09:28:08 +00:00
parent 89bf4e4e0e
commit 08430619b9
No known key found for this signature in database
GPG Key ID: 5CCC55849E3CF8E2
1 changed files with 3 additions and 12 deletions

View File

@ -65,28 +65,19 @@ var _ = Describe("Seaweed Controller", func() {
Eventually(func() bool { Eventually(func() bool {
err := k8sClient.Get(ctx, masterKey, masterSts) err := k8sClient.Get(ctx, masterKey, masterSts)
if err != nil { return err != nil
return false
}
return true
}, timeout, interval).Should(BeTrue()) }, timeout, interval).Should(BeTrue())
Expect(*masterSts.Spec.Replicas).Should(Equal(seaweed.Spec.Master.Replicas)) Expect(*masterSts.Spec.Replicas).Should(Equal(seaweed.Spec.Master.Replicas))
Eventually(func() bool { Eventually(func() bool {
err := k8sClient.Get(ctx, volumeKey, volumeSts) err := k8sClient.Get(ctx, volumeKey, volumeSts)
if err != nil { return err != nil
return false
}
return true
}, timeout, interval).Should(BeTrue()) }, timeout, interval).Should(BeTrue())
Expect(*volumeSts.Spec.Replicas).Should(Equal(seaweed.Spec.Volume.Replicas)) Expect(*volumeSts.Spec.Replicas).Should(Equal(seaweed.Spec.Volume.Replicas))
Eventually(func() bool { Eventually(func() bool {
err := k8sClient.Get(ctx, filerKey, filerSts) err := k8sClient.Get(ctx, filerKey, filerSts)
if err != nil { return err != nil
return false
}
return true
}, timeout, interval).Should(BeTrue()) }, timeout, interval).Should(BeTrue())
Expect(*filerSts.Spec.Replicas).Should(Equal(seaweed.Spec.Filer.Replicas)) Expect(*filerSts.Spec.Replicas).Should(Equal(seaweed.Spec.Filer.Replicas))
}) })