fix: only test abstract unix socket on linux
Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
parent
a04656c1dd
commit
85326d76f4
@ -24,6 +24,7 @@ import (
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
"testing"
|
||||
@ -45,8 +46,11 @@ const abstractSocketPrefix = "\x00"
|
||||
func TestFailFastWhenConnectShim(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
t.Run("abstract-unix-socket-v1", testFailFastWhenConnectShim(true, v1shimcli.AnonDialer))
|
||||
t.Run("abstract-unix-socket-v2", testFailFastWhenConnectShim(true, v2shimcli.AnonDialer))
|
||||
// abstract Unix domain sockets are only for Linux.
|
||||
if runtime.GOOS == "linux" {
|
||||
t.Run("abstract-unix-socket-v1", testFailFastWhenConnectShim(true, v1shimcli.AnonDialer))
|
||||
t.Run("abstract-unix-socket-v2", testFailFastWhenConnectShim(true, v2shimcli.AnonDialer))
|
||||
}
|
||||
t.Run("normal-unix-socket-v1", testFailFastWhenConnectShim(false, v1shimcli.AnonDialer))
|
||||
t.Run("normal-unix-socket-v2", testFailFastWhenConnectShim(false, v2shimcli.AnonDialer))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user