github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/daemon/cluster/executor/container/validate_windows_test.go (about) 1 //go:build windows 2 // +build windows 3 4 package container // import "github.com/docker/docker/daemon/cluster/executor/container" 5 import ( 6 "strings" 7 "testing" 8 9 "github.com/moby/swarmkit/v2/api" 10 ) 11 12 const ( 13 testAbsPath = `c:\foo` 14 testAbsNonExistent = `c:\some-non-existing-host-path\` 15 ) 16 17 func TestControllerValidateMountNamedPipe(t *testing.T) { 18 if _, err := newTestControllerWithMount(api.Mount{ 19 Type: api.MountTypeNamedPipe, 20 Source: "", 21 Target: `\\.\pipe\foo`, 22 }); err == nil || !strings.Contains(err.Error(), "invalid npipe source, source must not be empty") { 23 t.Fatalf("expected error, got: %v", err) 24 } 25 }