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
99e61466
Unverified
Commit
99e61466
authored
Apr 16, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76637 from mm4tt/test_network
Add missing node.address != "" condition in tests
parents
f44d04c1
618d6771
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
service_util.go
test/e2e/framework/service_util.go
+1
-1
ssh.go
test/e2e/framework/ssh.go
+2
-2
util.go
test/e2e/framework/util.go
+2
-2
No files found.
test/e2e/framework/service_util.go
View file @
99e61466
...
...
@@ -320,7 +320,7 @@ func (j *ServiceTestJig) CreateLoadBalancerService(namespace, serviceName string
func
GetNodeAddresses
(
node
*
v1
.
Node
,
addressType
v1
.
NodeAddressType
)
(
ips
[]
string
)
{
for
j
:=
range
node
.
Status
.
Addresses
{
nodeAddress
:=
&
node
.
Status
.
Addresses
[
j
]
if
nodeAddress
.
Type
==
addressType
{
if
nodeAddress
.
Type
==
addressType
&&
nodeAddress
.
Address
!=
""
{
ips
=
append
(
ips
,
nodeAddress
.
Address
)
}
}
...
...
test/e2e/framework/ssh.go
View file @
99e61466
...
...
@@ -245,7 +245,7 @@ func IssueSSHCommandWithResult(cmd, provider string, node *v1.Node) (*SSHResult,
Logf
(
"Getting external IP address for %s"
,
node
.
Name
)
host
:=
""
for
_
,
a
:=
range
node
.
Status
.
Addresses
{
if
a
.
Type
==
v1
.
NodeExternalIP
{
if
a
.
Type
==
v1
.
NodeExternalIP
&&
a
.
Address
!=
""
{
host
=
net
.
JoinHostPort
(
a
.
Address
,
sshPort
)
break
}
...
...
@@ -254,7 +254,7 @@ func IssueSSHCommandWithResult(cmd, provider string, node *v1.Node) (*SSHResult,
if
host
==
""
{
// No external IPs were found, let's try to use internal as plan B
for
_
,
a
:=
range
node
.
Status
.
Addresses
{
if
a
.
Type
==
v1
.
NodeInternalIP
{
if
a
.
Type
==
v1
.
NodeInternalIP
&&
a
.
Address
!=
""
{
host
=
net
.
JoinHostPort
(
a
.
Address
,
sshPort
)
break
}
...
...
test/e2e/framework/util.go
View file @
99e61466
...
...
@@ -3424,7 +3424,7 @@ func NodeAddresses(nodelist *v1.NodeList, addrType v1.NodeAddressType) []string
hosts
:=
[]
string
{}
for
_
,
n
:=
range
nodelist
.
Items
{
for
_
,
addr
:=
range
n
.
Status
.
Addresses
{
if
addr
.
Type
==
addrType
{
if
addr
.
Type
==
addrType
&&
addr
.
Address
!=
""
{
hosts
=
append
(
hosts
,
addr
.
Address
)
break
}
...
...
@@ -4942,7 +4942,7 @@ func GetNodeExternalIP(node *v1.Node) (string, error) {
Logf
(
"Getting external IP address for %s"
,
node
.
Name
)
host
:=
""
for
_
,
a
:=
range
node
.
Status
.
Addresses
{
if
a
.
Type
==
v1
.
NodeExternalIP
{
if
a
.
Type
==
v1
.
NodeExternalIP
&&
a
.
Address
!=
""
{
host
=
net
.
JoinHostPort
(
a
.
Address
,
sshPort
)
break
}
...
...
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