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
85f09cbc
Commit
85f09cbc
authored
Mar 14, 2016
by
Phillip Wittrock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
node e2e - make more resilient to flakes
parent
4c2d129b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
e2e_service.go
test/e2e_node/e2e_service.go
+3
-1
kubelet_test.go
test/e2e_node/kubelet_test.go
+7
-6
No files found.
test/e2e_node/e2e_service.go
View file @
85f09cbc
...
@@ -140,7 +140,9 @@ func (es *e2eService) startKubeletServer() (*exec.Cmd, error) {
...
@@ -140,7 +140,9 @@ func (es *e2eService) startKubeletServer() (*exec.Cmd, error) {
"--api-servers"
,
"http://127.0.0.1:8080"
,
"--api-servers"
,
"http://127.0.0.1:8080"
,
"--address"
,
"0.0.0.0"
,
"--address"
,
"0.0.0.0"
,
"--port"
,
"10250"
,
"--port"
,
"10250"
,
"--hostname-override"
,
es
.
nodeName
)
// Required because hostname is inconsistent across hosts
"--hostname-override"
,
es
.
nodeName
,
// Required because hostname is inconsistent across hosts
"--volume-stats-agg-period"
,
"10s"
,
// Aggregate volumes frequently so tests don't need to wait as long
)
hcc
:=
newHealthCheckCommand
(
hcc
:=
newHealthCheckCommand
(
"http://127.0.0.1:10255/healthz"
,
"http://127.0.0.1:10255/healthz"
,
cmd
,
cmd
,
...
...
test/e2e_node/kubelet_test.go
View file @
85f09cbc
...
@@ -62,7 +62,7 @@ var _ = Describe("Kubelet", func() {
...
@@ -62,7 +62,7 @@ var _ = Describe("Kubelet", func() {
{
{
Image
:
"gcr.io/google_containers/busybox"
,
Image
:
"gcr.io/google_containers/busybox"
,
Name
:
podName
,
Name
:
podName
,
Command
:
[]
string
{
"
echo"
,
"'Hello World'
"
},
Command
:
[]
string
{
"
sh"
,
"-c"
,
"echo 'Hello World' ; sleep 240
"
},
},
},
},
},
},
},
...
@@ -82,7 +82,7 @@ var _ = Describe("Kubelet", func() {
...
@@ -82,7 +82,7 @@ var _ = Describe("Kubelet", func() {
buf
:=
new
(
bytes
.
Buffer
)
buf
:=
new
(
bytes
.
Buffer
)
buf
.
ReadFrom
(
rc
)
buf
.
ReadFrom
(
rc
)
return
buf
.
String
()
return
buf
.
String
()
},
time
.
Second
*
30
,
time
.
Second
*
4
)
.
Should
(
Equal
(
"'Hello World'
\n
"
))
},
time
.
Minute
,
time
.
Second
*
4
)
.
Should
(
Equal
(
"Hello World
\n
"
))
})
})
It
(
"it should be possible to delete"
,
func
()
{
It
(
"it should be possible to delete"
,
func
()
{
...
@@ -109,7 +109,7 @@ var _ = Describe("Kubelet", func() {
...
@@ -109,7 +109,7 @@ var _ = Describe("Kubelet", func() {
{
{
Image
:
"gcr.io/google_containers/busybox"
,
Image
:
"gcr.io/google_containers/busybox"
,
Name
:
podName
,
Name
:
podName
,
Command
:
[]
string
{
"sh"
,
"-c"
,
"echo test > /file"
},
Command
:
[]
string
{
"sh"
,
"-c"
,
"echo test > /file
; sleep 240
"
},
SecurityContext
:
&
api
.
SecurityContext
{
SecurityContext
:
&
api
.
SecurityContext
{
ReadOnlyRootFilesystem
:
&
isReadOnly
,
ReadOnlyRootFilesystem
:
&
isReadOnly
,
},
},
...
@@ -131,7 +131,7 @@ var _ = Describe("Kubelet", func() {
...
@@ -131,7 +131,7 @@ var _ = Describe("Kubelet", func() {
buf
:=
new
(
bytes
.
Buffer
)
buf
:=
new
(
bytes
.
Buffer
)
buf
.
ReadFrom
(
rc
)
buf
.
ReadFrom
(
rc
)
return
buf
.
String
()
return
buf
.
String
()
},
time
.
Second
*
30
,
time
.
Second
*
4
)
.
Should
(
Equal
(
"sh: can't create /file: Read-only file system
\n
"
))
},
time
.
Minute
,
time
.
Second
*
4
)
.
Should
(
Equal
(
"sh: can't create /file: Read-only file system
\n
"
))
})
})
It
(
"it should be possible to delete"
,
func
()
{
It
(
"it should be possible to delete"
,
func
()
{
...
@@ -154,7 +154,7 @@ var _ = Describe("Kubelet", func() {
...
@@ -154,7 +154,7 @@ var _ = Describe("Kubelet", func() {
createPod
(
cl
,
podName
,
namespace
,
[]
api
.
Container
{
createPod
(
cl
,
podName
,
namespace
,
[]
api
.
Container
{
{
{
Image
:
"gcr.io/google_containers/busybox"
,
Image
:
"gcr.io/google_containers/busybox"
,
Command
:
[]
string
{
"sh"
,
"-c"
,
"
echo 'Hello World' | tee ~/file | tee /test-empty-dir-mnt | sleep 60
"
},
Command
:
[]
string
{
"sh"
,
"-c"
,
"
while true; do echo 'hello world' | tee ~/file | tee /test-empty-dir-mnt ; sleep 1; done
"
},
Name
:
podName
+
containerSuffix
,
Name
:
podName
+
containerSuffix
,
VolumeMounts
:
[]
api
.
VolumeMount
{
VolumeMounts
:
[]
api
.
VolumeMount
{
{
MountPath
:
"/test-empty-dir-mnt"
,
Name
:
"test-empty-dir"
},
{
MountPath
:
"/test-empty-dir-mnt"
,
Name
:
"test-empty-dir"
},
...
@@ -168,7 +168,8 @@ var _ = Describe("Kubelet", func() {
...
@@ -168,7 +168,8 @@ var _ = Describe("Kubelet", func() {
}
}
// Sleep long enough for cadvisor to see the pod and calculate all of its metrics
// Sleep long enough for cadvisor to see the pod and calculate all of its metrics
time
.
Sleep
(
60
*
time
.
Second
)
// TODO: Get this to work with polling / eventually
time
.
Sleep
(
time
.
Minute
*
2
)
})
})
Context
(
"when querying /stats/summary"
,
func
()
{
Context
(
"when querying /stats/summary"
,
func
()
{
...
...
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