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
0ab29b48
Unverified
Commit
0ab29b48
authored
Oct 18, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69944 from jingxu97/defertest
Make sure kubelet is restarted after it is stopped in the test
parents
1ba06b04
9de35403
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
utils.go
test/e2e/storage/utils/utils.go
+5
-5
No files found.
test/e2e/storage/utils/utils.go
View file @
0ab29b48
...
...
@@ -220,13 +220,13 @@ func TestVolumeUnmountsFromDeletedPodWithForceOption(c clientset.Interface, f *f
Expect
(
result
.
Code
)
.
To
(
BeZero
(),
fmt
.
Sprintf
(
"Expected grep exit code of 0, got %d"
,
result
.
Code
))
}
By
(
"Stopping the kubelet."
)
KubeletCommand
(
KStop
,
c
,
clientPod
)
// This command is to make sure kubelet is started after test finishes no matter it fails or not.
defer
func
()
{
if
err
!=
nil
{
KubeletCommand
(
KStart
,
c
,
clientPod
)
}
KubeletCommand
(
KStart
,
c
,
clientPod
)
}()
By
(
"Stopping the kubelet."
)
KubeletCommand
(
KStop
,
c
,
clientPod
)
By
(
fmt
.
Sprintf
(
"Deleting Pod %q"
,
clientPod
.
Name
))
if
forceDelete
{
err
=
c
.
CoreV1
()
.
Pods
(
clientPod
.
Namespace
)
.
Delete
(
clientPod
.
Name
,
metav1
.
NewDeleteOptions
(
0
))
...
...
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