Merge pull request #47203 from spiffxp/selfclient-ipv6-loopback

Automatic merge from submit-queue (batch tested with PRs 48402, 47203, 47460, 48335, 48322)

TestLoopbackHostPort should accept IPv6 loopback host

Attempting to get unit tests to pass on darwin per [our unit testing policy](https://github.com/kubernetes/community/blob/master/contributors/devel/testing.md#unit-tests)

part of #48509

/cc @kubernetes/sig-api-machinery-bugs
pull/6/head
Kubernetes Submit Queue 2017-07-11 21:01:33 -07:00 committed by GitHub
commit 3217495f52
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ limitations under the License.
package server
import (
"strings"
"net"
"testing"
)
@ -37,8 +37,8 @@ func TestLoopbackHostPort(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if !strings.HasPrefix(host, "127.") {
t.Fatalf("expected host to start with 127., got %q", host)
if ip := net.ParseIP(host); ip == nil || !ip.IsLoopback() {
t.Fatalf("expected host to be loopback, got %q", host)
}
if port != "443" {
t.Fatalf("expected 443 as port, got %q", port)