From: Alex Brainman Date: Sun, 30 Apr 2017 05:51:55 +0000 (+1000) Subject: os: skip TestNetworkSymbolicLink if Server service is not started X-Git-Tag: go1.9beta1~377 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=37c2d6b277e6bd305115fbd69d99555cc7a053c4;p=gostls13.git os: skip TestNetworkSymbolicLink if Server service is not started Fixes #20179 Change-Id: I2b405c9a212a75aae628ad51885616d33c054191 Reviewed-on: https://go-review.googlesource.com/42190 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/os/os_windows_test.go b/src/os/os_windows_test.go index 84066dee00..fcf6fa6d1b 100644 --- a/src/os/os_windows_test.go +++ b/src/os/os_windows_test.go @@ -429,6 +429,8 @@ func TestDirectorySymbolicLink(t *testing.T) { func TestNetworkSymbolicLink(t *testing.T) { testenv.MustHaveSymlink(t) + const _NERR_ServerNotStarted = syscall.Errno(2114) + dir, err := ioutil.TempDir("", "TestNetworkSymbolicLink") if err != nil { t.Fatal(err) @@ -479,6 +481,9 @@ func TestNetworkSymbolicLink(t *testing.T) { if err == syscall.ERROR_ACCESS_DENIED { t.Skip("you don't have enough privileges to add network share") } + if err == _NERR_ServerNotStarted { + t.Skip(_NERR_ServerNotStarted.Error()) + } t.Fatal(err) } defer func() {