Making e2e tests less flaky (#121)

This commit is contained in:
Dario Tranchitella
2020-10-31 12:28:17 +01:00
committed by GitHub
parent ee6e3aa0df
commit 2af568f0ed
18 changed files with 148 additions and 120 deletions

View File

@@ -169,14 +169,14 @@ var _ = Describe("creating namespaces within a Tenant with resources", func() {
}
nsl := []string{"bim", "bum", "bam"}
JustBeforeEach(func() {
tnt.ResourceVersion = ""
Expect(k8sClient.Create(context.TODO(), tnt)).Should(Succeed())
EventuallyCreation(func() error {
return k8sClient.Create(context.TODO(), tnt)
}).Should(Succeed())
By("creating the Namespaces", func() {
for _, i := range nsl {
ns := NewNamespace(i)
NamespaceCreationShouldSucceed(ns, tnt, defaultTimeoutInterval)
NamespaceShouldBeManagedByTenant(ns, tnt, defaultTimeoutInterval)
NamespaceCreation(ns, tnt, defaultTimeoutInterval).Should(Succeed())
TenantNamespaceList(tnt, podRecreationTimeoutInterval).Should(ContainElement(ns.GetName()))
}
})
})