Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we validate some spec that we are converting?

})

// +kubebuilder:scaffold:e2e-webhooks-checks

// TODO: Customize the e2e test suite with scenarios specific to your project.
Expand Down