credentials: accept another listen error as lack of support in test (#3097)

This commit is contained in:
Doug Fawley 2019-10-14 16:16:11 -07:00 committed by GitHub
parent 027cd627f8
commit d5ab7434d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -150,8 +150,9 @@ func launchServer(t *testing.T, hs serverHandshake, done chan AuthInfo) net.List
func launchServerOnListenAddress(t *testing.T, hs serverHandshake, done chan AuthInfo, address string) net.Listener {
lis, err := net.Listen("tcp", address)
if err != nil {
if strings.Contains(err.Error(), "bind: cannot assign requested address") {
t.Skip("missing IPv6 support")
if strings.Contains(err.Error(), "bind: cannot assign requested address") ||
strings.Contains(err.Error(), "socket: address family not supported by protocol") {
t.Skipf("no support for address %v", address)
}
t.Fatalf("Failed to listen: %v", err)
}