Skip to content

Commit

Permalink
modify test code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfyharukz committed Sep 26, 2019
1 parent 81c672e commit 4b1d129
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions controllers/cronjob_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"

batchv1 "github.com/kfyharukz/kubebuilder-tutorial/api/v1"
kbatch "k8s.io/api/batch/v1"
)

func testCronjobReconcile() {
Expand All @@ -51,10 +50,7 @@ func testCronjobReconcile() {
Scheme: mgr.GetScheme(),
}

err = ctrl.NewControllerManagedBy(mgr).
For(&batchv1.CronJob{}).
Owns(&kbatch.Job{}).
Complete(rc)
err = rc.SetupWithManager(mgr)
Expect(err).NotTo(HaveOccurred())

stopMgr, mgrStopped = StartTestManager(mgr)
Expand Down

0 comments on commit 4b1d129

Please sign in to comment.