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
926ee5b9
Commit
926ee5b9
authored
May 02, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24641 from caesarxuchao/pods-test
Automatic merge from submit-queue move pods.go to pods_test.go fix #24635
parents
708c1a5c
6ceebe72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
testing.md
docs/devel/testing.md
+1
-1
pods_test.go
test/integration/pods_test.go
+5
-10
No files found.
docs/devel/testing.md
View file @
926ee5b9
...
@@ -141,7 +141,7 @@ is [table driven testing](https://github.com/golang/go/wiki/TableDrivenTests)
...
@@ -141,7 +141,7 @@ is [table driven testing](https://github.com/golang/go/wiki/TableDrivenTests)
-
Example:
[
TestNamespaceAuthorization
](
../../test/integration/auth_test.go
)
-
Example:
[
TestNamespaceAuthorization
](
../../test/integration/auth_test.go
)
*
Integration tests must run in parallel
*
Integration tests must run in parallel
-
Each test should create its own master, httpserver and config.
-
Each test should create its own master, httpserver and config.
-
Example:
[
TestPodUpdateActiveDeadlineSeconds
](
../../test/integration/pods.go
)
-
Example:
[
TestPodUpdateActiveDeadlineSeconds
](
../../test/integration/pods
_test
.go
)
*
See
[
coding conventions
](
coding-conventions.md
)
.
*
See
[
coding conventions
](
coding-conventions.md
)
.
### Install etcd dependency
### Install etcd dependency
...
...
test/integration/pods.go
→
test/integration/pods
_test
.go
View file @
926ee5b9
...
@@ -59,7 +59,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
...
@@ -59,7 +59,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
prototypePod
:=
func
()
*
api
.
Pod
{
prototypePod
:=
func
()
*
api
.
Pod
{
return
&
api
.
Pod
{
return
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"
XXX
"
,
Name
:
"
xxx
"
,
},
},
Spec
:
api
.
PodSpec
{
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
Containers
:
[]
api
.
Container
{
...
@@ -87,7 +87,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
...
@@ -87,7 +87,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
{
{
name
:
"no change, set"
,
name
:
"no change, set"
,
original
:
&
i30
,
original
:
&
i30
,
update
:
&
i
6
0
,
update
:
&
i
3
0
,
valid
:
true
,
valid
:
true
,
},
},
{
{
...
@@ -120,17 +120,12 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
...
@@ -120,17 +120,12 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
update
:
&
iNeg
,
update
:
&
iNeg
,
valid
:
false
,
valid
:
false
,
},
},
// zero is not allowed, must be a positive integer
{
{
name
:
"change to zero from positive"
,
name
:
"change to zero from positive"
,
original
:
&
i30
,
original
:
&
i30
,
update
:
&
iZero
,
update
:
&
iZero
,
valid
:
true
,
valid
:
false
,
},
{
name
:
"change to zero from nil"
,
original
:
nil
,
update
:
&
iZero
,
valid
:
true
,
},
},
{
{
name
:
"change to nil from positive"
,
name
:
"change to nil from positive"
,
...
@@ -182,7 +177,7 @@ func TestPodReadOnlyFilesystem(t *testing.T) {
...
@@ -182,7 +177,7 @@ func TestPodReadOnlyFilesystem(t *testing.T) {
pod
:=
&
api
.
Pod
{
pod
:=
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"
XXX
"
,
Name
:
"
xxx
"
,
},
},
Spec
:
api
.
PodSpec
{
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
Containers
:
[]
api
.
Container
{
...
...
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