]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: skip part of TestNTNamespaceSymlink
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 15 Jan 2019 08:37:17 +0000 (19:37 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 15 Jan 2019 10:23:31 +0000 (10:23 +0000)
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>
src/path/filepath/path_windows_test.go

index 3fcccfab785c6725ed12def644d1e907142aca75..d1735d39bd8ccfb69a4b5bd706a99abbca7db8b4 100644 (file)
@@ -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 {