mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-20 01:47:33 +00:00
all: use named pipes on windows
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -7,6 +7,7 @@ package safesocket
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -14,7 +15,12 @@ func TestBasics(t *testing.T) {
|
||||
// Make the socket in a temp dir rather than the cwd
|
||||
// so that the test can be run from a mounted filesystem (#2367).
|
||||
dir := t.TempDir()
|
||||
sock := filepath.Join(dir, "test")
|
||||
var sock string
|
||||
if runtime.GOOS != "windows" {
|
||||
sock = filepath.Join(dir, "test")
|
||||
} else {
|
||||
sock = fmt.Sprintf(`\\.\pipe\tailscale-test`)
|
||||
}
|
||||
|
||||
l, port, err := Listen(sock, 0)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user