diff --git a/Makefile b/Makefile index 0604fc547ff..1a31dc717d1 100644 --- a/Makefile +++ b/Makefile @@ -162,7 +162,7 @@ test-e2e-local: ## Run the end-to-end tests locally ./test/e2e/local.sh .PHONY: test-e2e-ci -test-e2e-ci: ## Run the end-to-end tests (used in the CI)` +test-e2e-ci: ## Run the end-to-end tests (used in the CI) ./test/e2e/ci.sh .PHONY: test-book diff --git a/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go b/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go index 94b06366fe2..27776ce8875 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go @@ -313,6 +313,24 @@ var _ = Describe("Manager", Ordered, func() { Eventually(verifyCAInjection).Should(Succeed()) }) + It("should convert CronJob v1 to v2", func() { + By("creating CronJob v1 resource") + cmd := exec.Command( + "kubectl", "create", + "-f", filepath.Join("config", "samples", "batch_v1_cronjob.yaml"), + ) + _, err := utils.Run(cmd) + Expect(err).NotTo(HaveOccurred(), "Failed to create CronJob v1 resource") + + By("fetching CronJob v2 resource") + cmd = exec.Command( + "kubectl", "get", + "cronjobs.v2.batch.tutorial.kubebuilder.io", "cronjob-sample", + ) + _, err = utils.Run(cmd) + Expect(err).NotTo(HaveOccurred(), "Failed to get CronJob v2 resource") + }) + // +kubebuilder:scaffold:e2e-webhooks-checks // TODO: Customize the e2e test suite with scenarios specific to your project.