From 37c2d6b277e6bd305115fbd69d99555cc7a053c4 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Sun, 30 Apr 2017 15:51:55 +1000 Subject: [PATCH] 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 --- src/os/os_windows_test.go | 5 +++++ 1 file changed, 5 insertions(+) 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() { -- 2.48.1