removing the definitions by removing their CRDs

This commit is contained in:
Ryan Zhang
2021-03-04 19:56:54 -08:00
parent c121d33b2c
commit 1976a0fa64
+17
View File
@@ -286,4 +286,21 @@ var _ = AfterSuite(func() {
}
Expect(k8sClient.Delete(context.Background(), &crd)).Should(BeNil())
By("Deleted the custom resource definition")
By("Deleting all the definitions by deleting the definition CRDs")
crd = crdv1.CustomResourceDefinition{
ObjectMeta: metav1.ObjectMeta{
Name: "workloaddefinitions.core.oam.dev",
},
}
Expect(k8sClient.Delete(context.Background(), &crd)).Should(SatisfyAny(BeNil(), &util.NotFoundMatcher{}))
By("Deleted the workloaddefinitions CRD")
crd = crdv1.CustomResourceDefinition{
ObjectMeta: metav1.ObjectMeta{
Name: "traitdefinitions.core.oam.dev",
},
}
Expect(k8sClient.Delete(context.Background(), &crd)).Should(SatisfyAny(BeNil(), &util.NotFoundMatcher{}))
By("Deleted the workloaddefinitions CRD")
})