Merge pull request #15045 from brendandburns/fix4

Disable jobs tests in GKE
This commit is contained in:
Brendan Burns 2015-10-02 21:39:10 -07:00
commit f92ee71029

View File

@ -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)