From d45b26b1b7e7ac1823156b0a027911413e993d75 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Sun, 30 Apr 2017 15:51:55 +1000 Subject: [release-branch.go1.8] 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 Reviewed-on: https://go-review.googlesource.com/68030 Run-TryBot: Chris Broadfoot Reviewed-by: Alex Brainman Reviewed-by: Ian Lance Taylor --- 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 54ba99bf88..ae23b7ab41 100644 --- a/src/os/os_windows_test.go +++ b/src/os/os_windows_test.go @@ -404,6 +404,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) @@ -454,6 +456,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() { -- cgit v1.2.3-54-g00ecf