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