Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f92ee710
Commit
f92ee710
authored
Oct 02, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15045 from brendandburns/fix4
Disable jobs tests in GKE
parents
02f878cf
427a9249
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
job.go
test/e2e/job.go
+8
-0
No files found.
test/e2e/job.go
View file @
f92ee710
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment