mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Set RequireRoot to be a test helper. (#16641)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user