Skip to content

Commit 9a3941f

Browse files
nileshpatracharlievieth
authored andcommitted
Skip TestFastWalk_ErrPermission as root user
1 parent fc359aa commit 9a3941f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fastwalk_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"io/fs"
1111
"math"
1212
"os"
13+
"os/user"
1314
"path/filepath"
1415
"reflect"
1516
"regexp"
@@ -989,6 +990,9 @@ func TestFastWalk_ErrNotExist(t *testing.T) {
989990
}
990991

991992
func TestFastWalk_ErrPermission(t *testing.T) {
993+
if u, err := user.Current(); err == nil && u.Uid == "0" {
994+
t.Skip("Skip test as root user")
995+
}
992996
if runtime.GOOS == "windows" {
993997
t.Skip("test not supported for Windows")
994998
}

0 commit comments

Comments
 (0)