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
daf17e2a
Unverified
Commit
daf17e2a
authored
Oct 23, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69571 from bclau/tests-linux-commands-fix
tests: Makes tests' commands platform agnostic
parents
8be25aaa
7cd4ebf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
networking_utils.go
test/e2e/framework/networking_utils.go
+2
-2
network_policy.go
test/e2e/network/network_policy.go
+1
-1
No files found.
test/e2e/framework/networking_utils.go
View file @
daf17e2a
...
@@ -292,13 +292,13 @@ func (config *NetworkingTestConfig) DialFromNode(protocol, targetIP string, targ
...
@@ -292,13 +292,13 @@ func (config *NetworkingTestConfig) DialFromNode(protocol, targetIP string, targ
if
protocol
==
"udp"
{
if
protocol
==
"udp"
{
// TODO: It would be enough to pass 1s+epsilon to timeout, but unfortunately
// TODO: It would be enough to pass 1s+epsilon to timeout, but unfortunately
// busybox timeout doesn't support non-integer values.
// busybox timeout doesn't support non-integer values.
cmd
=
fmt
.
Sprintf
(
"echo 'hostName' |
timeout -t 2
nc -w 1 -u %s %d"
,
targetIP
,
targetPort
)
cmd
=
fmt
.
Sprintf
(
"echo 'hostName' | nc -w 1 -u %s %d"
,
targetIP
,
targetPort
)
}
else
{
}
else
{
ipPort
:=
net
.
JoinHostPort
(
targetIP
,
strconv
.
Itoa
(
targetPort
))
ipPort
:=
net
.
JoinHostPort
(
targetIP
,
strconv
.
Itoa
(
targetPort
))
// The current versions of curl included in CentOS and RHEL distros
// The current versions of curl included in CentOS and RHEL distros
// misinterpret square brackets around IPv6 as globbing, so use the -g
// misinterpret square brackets around IPv6 as globbing, so use the -g
// argument to disable globbing to handle the IPv6 case.
// argument to disable globbing to handle the IPv6 case.
cmd
=
fmt
.
Sprintf
(
"
timeout -t 15 curl -g -q -s
--connect-timeout 1 http://%s/hostName"
,
ipPort
)
cmd
=
fmt
.
Sprintf
(
"
curl -g -q -s --max-time 15
--connect-timeout 1 http://%s/hostName"
,
ipPort
)
}
}
// TODO: This simply tells us that we can reach the endpoints. Check that
// TODO: This simply tells us that we can reach the endpoints. Check that
...
...
test/e2e/network/network_policy.go
View file @
daf17e2a
...
@@ -560,7 +560,7 @@ func createNetworkClientPod(f *framework.Framework, namespace *v1.Namespace, pod
...
@@ -560,7 +560,7 @@ func createNetworkClientPod(f *framework.Framework, namespace *v1.Namespace, pod
Args
:
[]
string
{
Args
:
[]
string
{
"/bin/sh"
,
"/bin/sh"
,
"-c"
,
"-c"
,
fmt
.
Sprintf
(
"for i in $(seq 1 5); do
wget -T 8 %s.%s:%d -O -
&& exit 0 || sleep 1; done; exit 1"
,
fmt
.
Sprintf
(
"for i in $(seq 1 5); do
curl -s -m 8 %s.%s:%d
&& exit 0 || sleep 1; done; exit 1"
,
targetService
.
Name
,
targetService
.
Namespace
,
targetPort
),
targetService
.
Name
,
targetService
.
Namespace
,
targetPort
),
},
},
},
},
...
...
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