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
6d739c2b
Commit
6d739c2b
authored
Jun 24, 2015
by
Maxwell Forbes
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10285 from piosz/ping_e2e
Added test that verify Internet connection from inside of container.
parents
8b4170ed
8a219917
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
networking.go
test/e2e/networking.go
+30
-0
No files found.
test/e2e/networking.go
View file @
6d739c2b
...
@@ -50,6 +50,36 @@ var _ = Describe("Networking", func() {
...
@@ -50,6 +50,36 @@ var _ = Describe("Networking", func() {
}
}
})
})
It
(
"should provide Internet connection for containers"
,
func
()
{
By
(
"Running container which pings google.com"
)
podName
:=
"ping-test"
contName
:=
"ping-test-container"
pod
:=
&
api
.
Pod
{
TypeMeta
:
api
.
TypeMeta
{
Kind
:
"Pod"
,
},
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
podName
,
},
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
{
Name
:
contName
,
Image
:
"gcr.io/google_containers/busybox"
,
Command
:
[]
string
{
"ping"
,
"-c"
,
"3"
,
"-w"
,
"10"
,
"google.com"
},
},
},
RestartPolicy
:
api
.
RestartPolicyNever
,
},
}
_
,
err
:=
f
.
Client
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
expectNoError
(
err
)
defer
f
.
Client
.
Pods
(
f
.
Namespace
.
Name
)
.
Delete
(
podName
,
nil
)
By
(
"Verify that the pod succeed"
)
expectNoError
(
waitForPodSuccessInNamespace
(
f
.
Client
,
podName
,
contName
,
f
.
Namespace
.
Name
))
})
// First test because it has no dependencies on variables created later on.
// First test because it has no dependencies on variables created later on.
It
(
"should provide unchanging, static URL paths for kubernetes api services."
,
func
()
{
It
(
"should provide unchanging, static URL paths for kubernetes api services."
,
func
()
{
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
...
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