@@ -506,9 +506,10 @@ func prepareSSHServer(t *testing.T) (connConfig *ConnectionConfig, cleanUp func(
506506 {HostIP : connConfig .hostIPv4 },
507507 }
508508
509- // lcow doesn't support ipv6 port bindings
509+ // docker desktop doesn't support ipv6 port bindings
510510 // see https://github.com/docker/for-win/issues/8211
511- if ! (runtime .GOOS == "windows" && info .OSType == "linux" ) {
511+ // and https://github.com/docker/for-mac/issues/1432
512+ if runtime .GOOS == "linux" {
512513 connConfig .hostIPv6 = "::1"
513514 portBindings = append (portBindings , nat.PortBinding {HostIP : connConfig .hostIPv6 })
514515 }
@@ -560,14 +561,14 @@ func prepareSSHServer(t *testing.T) (connConfig *ConnectionConfig, cleanUp func(
560561 var found bool
561562 connConfig .portIPv4 , found = portForHost (sshPortBinds , connConfig .hostIPv4 )
562563 if ! found {
563- err = errors .Errorf ("SSH port for %s not found" , connConfig .hostIPv4 )
564+ err = errors .Errorf ("SSH port for %s not found in %+v " , connConfig .hostIPv4 , sshPortBinds )
564565 return
565566 }
566567
567568 if connConfig .hostIPv6 != "" {
568569 connConfig .portIPv6 , found = portForHost (sshPortBinds , connConfig .hostIPv6 )
569570 if ! found {
570- err = errors .Errorf ("SSH port for %s not found" , connConfig .hostIPv6 )
571+ err = errors .Errorf ("SSH port for %s not found in %+v " , connConfig .hostIPv6 , sshPortBinds )
571572 return
572573 }
573574 }
0 commit comments