diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2019-01-15 19:37:17 +1100 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2019-01-15 10:23:31 +0000 |
commit | d82c9a167d9e3a09eb27a00b6125e1a3fea6dc3d (patch) | |
tree | 4b6ed1da938a80b7955bdd75d32c987c4f0a06fc /src/path | |
parent | 462e90259af39af9e23c9d919e002913042c2faa (diff) | |
download | go-d82c9a167d9e3a09eb27a00b6125e1a3fea6dc3d.tar.gz go-d82c9a167d9e3a09eb27a00b6125e1a3fea6dc3d.zip |
path/filepath: skip part of TestNTNamespaceSymlink
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 <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'src/path')
-rw-r--r-- | src/path/filepath/path_windows_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/path/filepath/path_windows_test.go b/src/path/filepath/path_windows_test.go index 3fcccfab78..d1735d39bd 100644 --- a/src/path/filepath/path_windows_test.go +++ b/src/path/filepath/path_windows_test.go @@ -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 { |