mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +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"
|
||||
)
|
||||
|
||||
// TODO: Activate these tests for GKE when we support experimental APIs there.
|
||||
var _ = Describe("Job", func() {
|
||||
f := NewFramework("job")
|
||||
parallelism := 2
|
||||
@ -48,6 +49,7 @@ var _ = Describe("Job", func() {
|
||||
|
||||
// Simplest case: all pods succeed promptly
|
||||
It("should run a job to completion when tasks succeed", func() {
|
||||
SkipIfProviderIs("gke")
|
||||
By("Creating a job")
|
||||
job := newTestJob("succeed", "all-succeed", api.RestartPolicyNever, parallelism, completions)
|
||||
job, err := createJob(f.Client, f.Namespace.Name, job)
|
||||
@ -60,6 +62,7 @@ var _ = Describe("Job", func() {
|
||||
|
||||
// Pods sometimes fail, but eventually succeed.
|
||||
It("should run a job to completion when tasks sometimes fail and are locally restarted", func() {
|
||||
SkipIfProviderIs("gke")
|
||||
By("Creating a job")
|
||||
// 50% chance of container success, local restarts.
|
||||
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
|
||||
It("should run a job to completion when tasks sometimes fail and are not locally restarted", func() {
|
||||
SkipIfProviderIs("gke")
|
||||
By("Creating a job")
|
||||
// 50% chance of container success, local restarts.
|
||||
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() {
|
||||
SkipIfProviderIs("gke")
|
||||
By("Creating a job")
|
||||
job := newTestJob("fail", "all-fail", api.RestartPolicyNever, parallelism, completions)
|
||||
job, err := createJob(f.Client, f.Namespace.Name, job)
|
||||
@ -101,6 +106,7 @@ var _ = Describe("Job", func() {
|
||||
})
|
||||
|
||||
It("should scale a job up", func() {
|
||||
SkipIfProviderIs("gke")
|
||||
startParallelism := 1
|
||||
endParallelism := 2
|
||||
By("Creating a job")
|
||||
@ -126,6 +132,7 @@ var _ = Describe("Job", func() {
|
||||
})
|
||||
|
||||
It("should scale a job down", func() {
|
||||
SkipIfProviderIs("gke")
|
||||
startParallelism := 2
|
||||
endParallelism := 1
|
||||
By("Creating a job")
|
||||
@ -151,6 +158,7 @@ var _ = Describe("Job", func() {
|
||||
})
|
||||
|
||||
It("should stop a job", func() {
|
||||
SkipIfProviderIs("gke")
|
||||
By("Creating a job")
|
||||
job := newTestJob("notTerminate", "foo", api.RestartPolicyNever, parallelism, completions)
|
||||
job, err := createJob(f.Client, f.Namespace.Name, job)
|
||||
|
Loading…
Reference in New Issue
Block a user