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
10368ee6
Unverified
Commit
10368ee6
authored
Oct 03, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68915 from oomichi/issue/68914
Add fall-back to get node IP on host_path tests
parents
34bf1160
dd9cffb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
host_path.go
test/e2e/common/host_path.go
+10
-4
No files found.
test/e2e/common/host_path.go
View file @
10368ee6
...
@@ -136,9 +136,12 @@ var _ = Describe("[sig-storage] HostPath", func() {
...
@@ -136,9 +136,12 @@ var _ = Describe("[sig-storage] HostPath", func() {
// Create the subPath directory on the host
// Create the subPath directory on the host
existing
:=
path
.
Join
(
source
.
Path
,
subPath
)
existing
:=
path
.
Join
(
source
.
Path
,
subPath
)
externalIP
,
err
:=
framework
.
GetNodeExternalIP
(
&
nodeList
.
Items
[
0
])
nodeIP
,
err
:=
framework
.
GetNodeExternalIP
(
&
nodeList
.
Items
[
0
])
if
err
!=
nil
{
nodeIP
,
err
=
framework
.
GetNodeInternalIP
(
&
nodeList
.
Items
[
0
])
}
framework
.
ExpectNoError
(
err
)
framework
.
ExpectNoError
(
err
)
result
,
err
:=
framework
.
SSH
(
fmt
.
Sprintf
(
"mkdir -p %s"
,
existing
),
external
IP
,
framework
.
TestContext
.
Provider
)
result
,
err
:=
framework
.
SSH
(
fmt
.
Sprintf
(
"mkdir -p %s"
,
existing
),
node
IP
,
framework
.
TestContext
.
Provider
)
framework
.
LogSSHResult
(
result
)
framework
.
LogSSHResult
(
result
)
framework
.
ExpectNoError
(
err
)
framework
.
ExpectNoError
(
err
)
if
result
.
Code
!=
0
{
if
result
.
Code
!=
0
{
...
@@ -182,9 +185,12 @@ var _ = Describe("[sig-storage] HostPath", func() {
...
@@ -182,9 +185,12 @@ var _ = Describe("[sig-storage] HostPath", func() {
// Create the subPath file on the host
// Create the subPath file on the host
existing
:=
path
.
Join
(
source
.
Path
,
subPath
)
existing
:=
path
.
Join
(
source
.
Path
,
subPath
)
externalIP
,
err
:=
framework
.
GetNodeExternalIP
(
&
nodeList
.
Items
[
0
])
nodeIP
,
err
:=
framework
.
GetNodeExternalIP
(
&
nodeList
.
Items
[
0
])
if
err
!=
nil
{
nodeIP
,
err
=
framework
.
GetNodeInternalIP
(
&
nodeList
.
Items
[
0
])
}
framework
.
ExpectNoError
(
err
)
framework
.
ExpectNoError
(
err
)
result
,
err
:=
framework
.
SSH
(
fmt
.
Sprintf
(
"echo
\"
mount-tester new file
\"
> %s"
,
existing
),
external
IP
,
framework
.
TestContext
.
Provider
)
result
,
err
:=
framework
.
SSH
(
fmt
.
Sprintf
(
"echo
\"
mount-tester new file
\"
> %s"
,
existing
),
node
IP
,
framework
.
TestContext
.
Provider
)
framework
.
LogSSHResult
(
result
)
framework
.
LogSSHResult
(
result
)
framework
.
ExpectNoError
(
err
)
framework
.
ExpectNoError
(
err
)
if
result
.
Code
!=
0
{
if
result
.
Code
!=
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