Skip to content

Commit

Permalink
path/filepath: skip part of TestNTNamespaceSymlink
Browse files Browse the repository at this point in the history
Recent CL 156398 extended TestNTNamespaceSymlink. But new code
fails, if user running the test does not have sufficient privilege
to create file symlink. Skip part of TestNTNamespaceSymlink, if
user cannot create symlink.

Fixes #29745

Change-Id: Ie4176429ba9dd98553ce9e91fd19851cc7353f42
Reviewed-on: https://go-review.googlesource.com/c/157917
Run-TryBot: Alex Brainman <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
  • Loading branch information
alexbrainman committed Jan 15, 2019
1 parent 462e902 commit d82c9a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/path/filepath/path_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ func TestNTNamespaceSymlink(t *testing.T) {
t.Errorf(`EvalSymlinks(%q): got %q, want %q`, dirlink, got, want)
}

// Make sure we have sufficient privilege to run mklink command.
testenv.MustHaveSymlink(t)

file := filepath.Join(tmpdir, "file")
err = ioutil.WriteFile(file, []byte(""), 0666)
if err != nil {
Expand Down

0 comments on commit d82c9a1

Please sign in to comment.