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
824d0b11
Commit
824d0b11
authored
Mar 13, 2017
by
andrewsykim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e tests for status.hostIP in downward api
parent
91c027d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
kubelet_pods_test.go
pkg/kubelet/kubelet_pods_test.go
+13
-0
downward_api.go
test/e2e/common/downward_api.go
+2
-0
No files found.
pkg/kubelet/kubelet_pods_test.go
View file @
824d0b11
...
...
@@ -502,6 +502,15 @@ func TestMakeEnvironmentVariables(t *testing.T) {
},
},
},
{
Name
:
"HOST_IP"
,
ValueFrom
:
&
v1
.
EnvVarSource
{
FieldRef
:
&
v1
.
ObjectFieldSelector
{
APIVersion
:
api
.
Registry
.
GroupOrDie
(
v1
.
GroupName
)
.
GroupVersion
.
String
(),
FieldPath
:
"status.hostIP"
,
},
},
},
},
},
masterServiceNs
:
"nothing"
,
...
...
@@ -512,6 +521,7 @@ func TestMakeEnvironmentVariables(t *testing.T) {
{
Name
:
"POD_NODE_NAME"
,
Value
:
"node-name"
},
{
Name
:
"POD_SERVICE_ACCOUNT_NAME"
,
Value
:
"special"
},
{
Name
:
"POD_IP"
,
Value
:
"1.2.3.4"
},
{
Name
:
"HOST_IP"
,
Value
:
"5.6.7.8"
},
},
},
{
...
...
@@ -1142,6 +1152,9 @@ func TestMakeEnvironmentVariables(t *testing.T) {
ServiceAccountName
:
"special"
,
NodeName
:
"node-name"
,
},
Status
:
v1
.
PodStatus
{
HostIP
:
"5.6.7.8"
,
},
}
podIP
:=
"1.2.3.4"
...
...
test/e2e/common/downward_api.go
View file @
824d0b11
...
...
@@ -73,6 +73,8 @@ var _ = framework.KubeDescribe("Downward API", func() {
FieldPath
:
"status.podIP"
,
},
},
},
{
Name
:
"HOST_IP"
,
ValueFrom
:
&
v1
.
EnvVarSource
{
FieldRef
:
&
v1
.
ObjectFieldSelector
{
...
...
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