Set RequireRoot to be a test helper. (#16641)

This commit is contained in:
Charlie Voiselle
2023-04-06 14:34:36 -04:00
committed by GitHub
parent beb480f332
commit d7e87bab9d

View File

@@ -26,6 +26,7 @@ func Parallel(t *testing.T) {
}
func RequireRoot(t *testing.T) {
t.Helper()
if syscall.Getuid() != 0 {
t.Skip("test requires root")
}