Commit 37c2d6b2 authored by Alex Brainman's avatar Alex Brainman

os: skip TestNetworkSymbolicLink if Server service is not started

Fixes #20179

Change-Id: I2b405c9a212a75aae628ad51885616d33c054191
Reviewed-on: https://go-review.googlesource.com/42190Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent dfeecda9
...@@ -429,6 +429,8 @@ func TestDirectorySymbolicLink(t *testing.T) { ...@@ -429,6 +429,8 @@ func TestDirectorySymbolicLink(t *testing.T) {
func TestNetworkSymbolicLink(t *testing.T) { func TestNetworkSymbolicLink(t *testing.T) {
testenv.MustHaveSymlink(t) testenv.MustHaveSymlink(t)
const _NERR_ServerNotStarted = syscall.Errno(2114)
dir, err := ioutil.TempDir("", "TestNetworkSymbolicLink") dir, err := ioutil.TempDir("", "TestNetworkSymbolicLink")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -479,6 +481,9 @@ func TestNetworkSymbolicLink(t *testing.T) { ...@@ -479,6 +481,9 @@ func TestNetworkSymbolicLink(t *testing.T) {
if err == syscall.ERROR_ACCESS_DENIED { if err == syscall.ERROR_ACCESS_DENIED {
t.Skip("you don't have enough privileges to add network share") t.Skip("you don't have enough privileges to add network share")
} }
if err == _NERR_ServerNotStarted {
t.Skip(_NERR_ServerNotStarted.Error())
}
t.Fatal(err) t.Fatal(err)
} }
defer func() { defer func() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment