func setup(ctx context.Context, t *testing.T) (kubeapiservertesting.TearDownFunc, *cronjob.ControllerV2, *job.Controller, informers.SharedInformerFactory, clientset.Interface) { … } func newCronJob(name, namespace, schedule string) *batchv1.CronJob { … } func cleanupCronJobs(t *testing.T, cjClient clientbatchv1.CronJobInterface, name string) { … } func validateJobAndPod(t *testing.T, clientSet clientset.Interface, namespace string) { … } func TestCronJobLaunchesPodAndCleansUp(t *testing.T) { … }