mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #15045 from brendandburns/fix4
Disable jobs tests in GKE
This commit is contained in:
commit
f92ee71029
@ -40,6 +40,7 @@ const (
|
|||||||
jobSelectorKey = "job"
|
jobSelectorKey = "job"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO: Activate these tests for GKE when we support experimental APIs there.
|
||||||
var _ = Describe("Job", func() {
|
var _ = Describe("Job", func() {
|
||||||
f := NewFramework("job")
|
f := NewFramework("job")
|
||||||
parallelism := 2
|
parallelism := 2
|
||||||
@ -48,6 +49,7 @@ var _ = Describe("Job", func() {
|
|||||||
|
|
||||||
// Simplest case: all pods succeed promptly
|
// Simplest case: all pods succeed promptly
|
||||||
It("should run a job to completion when tasks succeed", func() {
|
It("should run a job to completion when tasks succeed", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
job := newTestJob("succeed", "all-succeed", api.RestartPolicyNever, parallelism, completions)
|
job := newTestJob("succeed", "all-succeed", api.RestartPolicyNever, parallelism, completions)
|
||||||
job, err := createJob(f.Client, f.Namespace.Name, job)
|
job, err := createJob(f.Client, f.Namespace.Name, job)
|
||||||
@ -60,6 +62,7 @@ var _ = Describe("Job", func() {
|
|||||||
|
|
||||||
// Pods sometimes fail, but eventually succeed.
|
// Pods sometimes fail, but eventually succeed.
|
||||||
It("should run a job to completion when tasks sometimes fail and are locally restarted", func() {
|
It("should run a job to completion when tasks sometimes fail and are locally restarted", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
// 50% chance of container success, local restarts.
|
// 50% chance of container success, local restarts.
|
||||||
job := newTestJob("randomlySucceedOrFail", "rand-local", api.RestartPolicyOnFailure, parallelism, completions)
|
job := newTestJob("randomlySucceedOrFail", "rand-local", api.RestartPolicyOnFailure, parallelism, completions)
|
||||||
@ -73,6 +76,7 @@ var _ = Describe("Job", func() {
|
|||||||
|
|
||||||
// Pods sometimes fail, but eventually succeed, after pod restarts
|
// Pods sometimes fail, but eventually succeed, after pod restarts
|
||||||
It("should run a job to completion when tasks sometimes fail and are not locally restarted", func() {
|
It("should run a job to completion when tasks sometimes fail and are not locally restarted", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
// 50% chance of container success, local restarts.
|
// 50% chance of container success, local restarts.
|
||||||
job := newTestJob("randomlySucceedOrFail", "rand-non-local", api.RestartPolicyNever, parallelism, completions)
|
job := newTestJob("randomlySucceedOrFail", "rand-non-local", api.RestartPolicyNever, parallelism, completions)
|
||||||
@ -85,6 +89,7 @@ var _ = Describe("Job", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("should keep restarting failed pods", func() {
|
It("should keep restarting failed pods", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
job := newTestJob("fail", "all-fail", api.RestartPolicyNever, parallelism, completions)
|
job := newTestJob("fail", "all-fail", api.RestartPolicyNever, parallelism, completions)
|
||||||
job, err := createJob(f.Client, f.Namespace.Name, job)
|
job, err := createJob(f.Client, f.Namespace.Name, job)
|
||||||
@ -101,6 +106,7 @@ var _ = Describe("Job", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("should scale a job up", func() {
|
It("should scale a job up", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
startParallelism := 1
|
startParallelism := 1
|
||||||
endParallelism := 2
|
endParallelism := 2
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
@ -126,6 +132,7 @@ var _ = Describe("Job", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("should scale a job down", func() {
|
It("should scale a job down", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
startParallelism := 2
|
startParallelism := 2
|
||||||
endParallelism := 1
|
endParallelism := 1
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
@ -151,6 +158,7 @@ var _ = Describe("Job", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("should stop a job", func() {
|
It("should stop a job", func() {
|
||||||
|
SkipIfProviderIs("gke")
|
||||||
By("Creating a job")
|
By("Creating a job")
|
||||||
job := newTestJob("notTerminate", "foo", api.RestartPolicyNever, parallelism, completions)
|
job := newTestJob("notTerminate", "foo", api.RestartPolicyNever, parallelism, completions)
|
||||||
job, err := createJob(f.Client, f.Namespace.Name, job)
|
job, err := createJob(f.Client, f.Namespace.Name, job)
|
||||||
|
Loading…
Reference in New Issue
Block a user