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
af1e06eb
Unverified
Commit
af1e06eb
authored
Feb 27, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74660 from HotelsDotCom/feature/fix-expansion-tests
Fix pod creation for node e2e tests
parents
b2e9b2a8
83372066
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
expansion.go
test/e2e/common/expansion.go
+16
-20
No files found.
test/e2e/common/expansion.go
View file @
af1e06eb
...
@@ -376,14 +376,12 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
...
@@ -376,14 +376,12 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
}
}
By
(
"creating the pod with failed condition"
)
By
(
"creating the pod with failed condition"
)
pod
,
err
:=
f
.
ClientSet
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while creating pod"
)
err
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
f
.
ClientSet
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
Expect
(
err
)
.
To
(
HaveOccurred
(),
"while waiting for pod to be running"
)
var
podClient
*
framework
.
PodClient
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
podClient
=
f
.
PodClient
()
pod
=
podClient
.
Create
(
pod
)
err
:=
framework
.
WaitTimeoutForPodRunningInNamespace
(
f
.
ClientSet
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
Expect
(
err
)
.
To
(
HaveOccurred
(),
"while waiting for pod to be running"
)
By
(
"updating the pod"
)
By
(
"updating the pod"
)
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
...
@@ -470,10 +468,12 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
...
@@ -470,10 +468,12 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
}
}
By
(
"creating the pod"
)
By
(
"creating the pod"
)
pod
,
err
:=
f
.
ClientSet
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
pod
=
podClient
.
Create
(
pod
)
By
(
"waiting for pod running"
)
By
(
"waiting for pod running"
)
err
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
f
.
ClientSet
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
err
:
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
f
.
ClientSet
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"while waiting for pod to be running"
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"while waiting for pod to be running"
)
By
(
"creating a file in subpath"
)
By
(
"creating a file in subpath"
)
...
@@ -491,9 +491,6 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
...
@@ -491,9 +491,6 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
}
}
By
(
"updating the annotation value"
)
By
(
"updating the annotation value"
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
pod
.
ObjectMeta
.
Annotations
[
"mysubpath"
]
=
"mynewpath"
pod
.
ObjectMeta
.
Annotations
[
"mysubpath"
]
=
"mynewpath"
})
})
...
@@ -609,17 +606,15 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
...
@@ -609,17 +606,15 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
// Start pod
// Start pod
By
(
fmt
.
Sprintf
(
"Creating pod %s"
,
pod
.
Name
))
By
(
fmt
.
Sprintf
(
"Creating pod %s"
,
pod
.
Name
))
pod
,
err
:=
f
.
ClientSet
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
var
podClient
*
framework
.
PodClient
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while creating pod"
)
podClient
=
f
.
PodClient
()
pod
=
podClient
.
Create
(
pod
)
defer
func
()
{
defer
func
()
{
framework
.
DeletePodWithWait
(
f
,
f
.
ClientSet
,
pod
)
framework
.
DeletePodWithWait
(
f
,
f
.
ClientSet
,
pod
)
}()
}()
err
=
framework
.
WaitForPodRunningInNamespace
(
f
.
ClientSet
,
pod
)
err
:
=
framework
.
WaitForPodRunningInNamespace
(
f
.
ClientSet
,
pod
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while waiting for pod to be running"
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while waiting for pod to be running"
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
By
(
"updating the pod"
)
By
(
"updating the pod"
)
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
pod
.
ObjectMeta
.
Annotations
=
map
[
string
]
string
{
"mysubpath"
:
"newsubpath"
}
pod
.
ObjectMeta
.
Annotations
=
map
[
string
]
string
{
"mysubpath"
:
"newsubpath"
}
...
@@ -645,14 +640,15 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
...
@@ -645,14 +640,15 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
func
testPodFailSubpath
(
f
*
framework
.
Framework
,
pod
*
v1
.
Pod
)
{
func
testPodFailSubpath
(
f
*
framework
.
Framework
,
pod
*
v1
.
Pod
)
{
pod
,
err
:=
f
.
ClientSet
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
var
podClient
*
framework
.
PodClient
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while creating pod"
)
podClient
=
f
.
PodClient
()
pod
=
podClient
.
Create
(
pod
)
defer
func
()
{
defer
func
()
{
framework
.
DeletePodWithWait
(
f
,
f
.
ClientSet
,
pod
)
framework
.
DeletePodWithWait
(
f
,
f
.
ClientSet
,
pod
)
}()
}()
err
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
f
.
ClientSet
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
err
:
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
f
.
ClientSet
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
Expect
(
err
)
.
To
(
HaveOccurred
(),
"while waiting for pod to be running"
)
Expect
(
err
)
.
To
(
HaveOccurred
(),
"while waiting for pod to be running"
)
}
}
...
...
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