Skip to content

Commit bc5ae78

Browse files
committed
Validate uninstall does clean-up resources
Signed-off-by: Pires <[email protected]>
1 parent c86e36b commit bc5ae78

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

pkg/envtest/envtest_test.go

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,28 @@ var _ = Describe("Test", func() {
325325
})
326326
Expect(err).NotTo(HaveOccurred())
327327

328+
// Expect to NOT find the CRDs
329+
330+
crds := []string{
331+
"foos.bar.example.com",
332+
"bazs.qux.example.com",
333+
"captains.crew.example.com",
334+
"firstmates.crew.example.com",
335+
"drivers.crew.example.com",
336+
}
337+
placeholder := &v1beta1.CustomResourceDefinition{}
338+
Eventually(func() bool {
339+
for _, crd := range crds {
340+
err = c.Get(context.TODO(), types.NamespacedName{Name: crd}, placeholder)
341+
notFound := err != nil && apierrors.IsNotFound(err)
342+
if !notFound {
343+
return false
344+
}
345+
}
346+
return true
347+
}, 20).Should(BeTrue())
348+
328349
close(done)
329-
}, 10)
350+
}, 30)
330351
})
331352
})

0 commit comments

Comments
 (0)