mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Correct CronJob group version at remaining places
This commit is contained in:
parent
6962427b35
commit
ba9e93cb27
@ -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")
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user