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
83372066
Commit
83372066
authored
Feb 27, 2019
by
Kevin Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pod creation for node e2e tests
parent
076af3d1
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 @
83372066
...
...
@@ -376,14 +376,12 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
}
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
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"
)
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
...
...
@@ -470,10 +468,12 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
}
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"
)
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"
)
By
(
"creating a file in subpath"
)
...
...
@@ -491,9 +491,6 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
}
By
(
"updating the annotation value"
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
pod
.
ObjectMeta
.
Annotations
[
"mysubpath"
]
=
"mynewpath"
})
...
...
@@ -609,17 +606,15 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
// Start pod
By
(
fmt
.
Sprintf
(
"Creating pod %s"
,
pod
.
Name
))
pod
,
err
:=
f
.
ClientSet
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while creating pod"
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
pod
=
podClient
.
Create
(
pod
)
defer
func
()
{
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"
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
By
(
"updating the pod"
)
podClient
.
Update
(
podName
,
func
(
pod
*
v1
.
Pod
)
{
pod
.
ObjectMeta
.
Annotations
=
map
[
string
]
string
{
"mysubpath"
:
"newsubpath"
}
...
...
@@ -645,14 +640,15 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
func
testPodFailSubpath
(
f
*
framework
.
Framework
,
pod
*
v1
.
Pod
)
{
pod
,
err
:=
f
.
ClientSet
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
(),
"while creating pod"
)
var
podClient
*
framework
.
PodClient
podClient
=
f
.
PodClient
()
pod
=
podClient
.
Create
(
pod
)
defer
func
()
{
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"
)
}
...
...
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