Merge pull request #72918 from bclau/tests/windows-cmd-fix

tests: Makes UDP testing command more Windows friendly
pull/564/head
Kubernetes Prow Robot 2019-01-29 05:15:37 -08:00 committed by GitHub
commit d66db4a585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ func (config *NetworkingTestConfig) DialFromNode(protocol, targetIP string, targ
if protocol == "udp" {
// TODO: It would be enough to pass 1s+epsilon to timeout, but unfortunately
// busybox timeout doesn't support non-integer values.
cmd = fmt.Sprintf("echo 'hostName' | nc -w 1 -u %s %d", targetIP, targetPort)
cmd = fmt.Sprintf("echo hostName | nc -w 1 -u %s %d", targetIP, targetPort)
} else {
ipPort := net.JoinHostPort(targetIP, strconv.Itoa(targetPort))
// The current versions of curl included in CentOS and RHEL distros