diff options
| author | qmuntal <quimmuntal@gmail.com> | 2024-09-20 16:51:50 +0200 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2024-09-23 18:00:57 +0000 |
| commit | dfd0f0d8eb7ffe77e8b61e21dc59ba28a5a098df (patch) | |
| tree | 8eb0a2374f51f778cfb184d2101edc84452b1563 /src/os | |
| parent | ab5c22e7ed6bda79f07410c0041e020e52dc9b35 (diff) | |
| download | go-dfd0f0d8eb7ffe77e8b61e21dc59ba28a5a098df.tar.xz | |
os: skip TestReadlink sub-tests requiring symlinks when not enough
permissions are held
Some of the TestReadlink sub-tests require os.Symlink to succeed.
If the user doesn't have enough permissions to create symlinks, then
there is no point in running the test.
Change-Id: I06ec7e3ddf0016e804667bba0ee6ebe6baa01872
Reviewed-on: https://go-review.googlesource.com/c/go/+/614655
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/os_windows_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/os_windows_test.go b/src/os/os_windows_test.go index c8a133da81..fb95499c17 100644 --- a/src/os/os_windows_test.go +++ b/src/os/os_windows_test.go @@ -1269,6 +1269,9 @@ func TestReadlink(t *testing.T) { } t.Run(name, func(t *testing.T) { + if !tt.junction { + testenv.MustHaveSymlink(t) + } if !tt.relative { t.Parallel() } |
