]> Cypherpunks repositories - gostls13.git/commitdiff
os: skip TestNetworkSymbolicLink if Server service is not started
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 30 Apr 2017 05:51:55 +0000 (15:51 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 30 Apr 2017 07:04:30 +0000 (07:04 +0000)
Fixes #20179

Change-Id: I2b405c9a212a75aae628ad51885616d33c054191
Reviewed-on: https://go-review.googlesource.com/42190
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/os/os_windows_test.go

index 84066dee00a0316cbf70f6b336616e99bd0ec9b2..fcf6fa6d1bc7527ec7d75a647eeb9047114e8611 100644 (file)
@@ -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() {