mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-05-06 01:16:44 +00:00
Letting tests to accept eventually value, rather than strict expectation (#176)
This commit is contained in:
committed by
GitHub
parent
49c8131eb5
commit
cb986384db
@@ -70,7 +70,7 @@ var _ = Describe("creating a Namespace for a Tenant with additional metadata", f
|
||||
Eventually(func() (ok bool) {
|
||||
Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: ns.GetName()}, ns)).Should(Succeed())
|
||||
for k, v := range tnt.Spec.NamespacesMetadata.AdditionalLabels {
|
||||
if ok = Expect(ns.Labels).Should(HaveKeyWithValue(k, v)); !ok {
|
||||
if ok, _ = HaveKeyWithValue(k, v).Match(ns.Labels); !ok {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ var _ = Describe("creating a Namespace for a Tenant with additional metadata", f
|
||||
Eventually(func() (ok bool) {
|
||||
Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: ns.GetName()}, ns)).Should(Succeed())
|
||||
for k, v := range tnt.Spec.NamespacesMetadata.AdditionalAnnotations {
|
||||
if ok = Expect(ns.Annotations).Should(HaveKeyWithValue(k, v)); !ok {
|
||||
if ok, _ = HaveKeyWithValue(k, v).Match(ns.Annotations); !ok {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user