]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.8] os: skip TestNetworkSymbolicLink if Server service is not...
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 30 Apr 2017 05:51:55 +0000 (15:51 +1000)
committerChris Broadfoot <cbro@golang.org>
Wed, 4 Oct 2017 17:03:14 +0000 (17:03 +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>
Reviewed-on: https://go-review.googlesource.com/68030
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/os_windows_test.go

index 54ba99bf8849ead0a01e7efcc633ba397f7259a9..ae23b7ab41b2ca66886d4b6d4e3de3d76a62259b 100644 (file)
@@ -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() {