Skip to content

Commit eb228bd

Browse files
authored
Merge pull request #2859 from NikhilSharmaWe/testlimitComment
✨deploy-image/v1-alpha: add a todo comment for users stating envtest limitations
2 parents f2e7a0e + 1dc7685 commit eb228bd

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/controllers/controller-test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
107107
})
108108
109109
AfterEach(func() {
110+
// TODO(user): Attention if you improve this code by adding other context test you MUST
111+
// be aware of the current delete namespace limitations. More info: https://book.kubebuilder.io/reference/envtest.html#testing-considerations
110112
By("Deleting the Namespace to perform the tests")
111113
_ = k8sClient.Delete(ctx, namespace);
112114

testdata/project-v3-with-deploy-image/controllers/busybox_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ var _ = Describe("Busybox controller", func() {
6060
})
6161

6262
AfterEach(func() {
63+
// TODO(user): Attention if you improve this code by adding other context test you MUST
64+
// be aware of the current delete namespace limitations. More info: https://book.kubebuilder.io/reference/envtest.html#testing-considerations
6365
By("Deleting the Namespace to perform the tests")
6466
_ = k8sClient.Delete(ctx, namespace)
6567

testdata/project-v3-with-deploy-image/controllers/memcached_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ var _ = Describe("Memcached controller", func() {
6060
})
6161

6262
AfterEach(func() {
63+
// TODO(user): Attention if you improve this code by adding other context test you MUST
64+
// be aware of the current delete namespace limitations. More info: https://book.kubebuilder.io/reference/envtest.html#testing-considerations
6365
By("Deleting the Namespace to perform the tests")
6466
_ = k8sClient.Delete(ctx, namespace)
6567

testdata/project-v4-with-deploy-image/controllers/busybox_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ var _ = Describe("Busybox controller", func() {
6060
})
6161

6262
AfterEach(func() {
63+
// TODO(user): Attention if you improve this code by adding other context test you MUST
64+
// be aware of the current delete namespace limitations. More info: https://book.kubebuilder.io/reference/envtest.html#testing-considerations
6365
By("Deleting the Namespace to perform the tests")
6466
_ = k8sClient.Delete(ctx, namespace)
6567

testdata/project-v4-with-deploy-image/controllers/memcached_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ var _ = Describe("Memcached controller", func() {
6060
})
6161

6262
AfterEach(func() {
63+
// TODO(user): Attention if you improve this code by adding other context test you MUST
64+
// be aware of the current delete namespace limitations. More info: https://book.kubebuilder.io/reference/envtest.html#testing-considerations
6365
By("Deleting the Namespace to perform the tests")
6466
_ = k8sClient.Delete(ctx, namespace)
6567

0 commit comments

Comments
 (0)