Correct CronJob group version at remaining places

This commit is contained in:
Shyam Jeedigunta 2017-08-31 13:31:46 +02:00 committed by Maciej Szulik
parent 6962427b35
commit ba9e93cb27
No known key found for this signature in database
GPG Key ID: F15E55D276FA84C4
2 changed files with 3 additions and 3 deletions

View File

@ -218,7 +218,7 @@ func verifyRemainingCronJobsJobsPods(f *framework.Framework, clientSet clientset
cjNum, jobNum, podNum int) (bool, error) {
var ret = true
cronJobs, err := f.ClientSet.BatchV2alpha1().CronJobs(f.Namespace.Name).List(metav1.ListOptions{})
cronJobs, err := f.ClientSet.BatchV1beta1().CronJobs(f.Namespace.Name).List(metav1.ListOptions{})
if err != nil {
return false, fmt.Errorf("Failed to list cronjobs: %v", err)
}
@ -957,7 +957,7 @@ var _ = SIGDescribe("Garbage collector", func() {
}
By("Delete the cronjob")
if err := f.ClientSet.BatchV2alpha1().CronJobs(f.Namespace.Name).Delete(cronJob.Name, getBackgroundOptions()); err != nil {
if err := f.ClientSet.BatchV1beta1().CronJobs(f.Namespace.Name).Delete(cronJob.Name, getBackgroundOptions()); err != nil {
framework.Failf("Failed to delete the CronJob: %v", err)
}
By("Verify if cronjob does not leave jobs nor pods behind")

View File

@ -244,7 +244,7 @@ var _ = SIGDescribe("Kubectl alpha client", func() {
framework.RunKubectlOrDie("run", cjName, "--restart=OnFailure", "--generator=cronjob/v2alpha1",
"--schedule="+schedule, "--image="+busyboxImage, nsFlag)
By("verifying the CronJob " + cjName + " was created")
sj, err := c.BatchV2alpha1().CronJobs(ns).Get(cjName, metav1.GetOptions{})
sj, err := c.BatchV1beta1().CronJobs(ns).Get(cjName, metav1.GetOptions{})
if err != nil {
framework.Failf("Failed getting CronJob %s: %v", cjName, err)
}