Skip to content

Commit

Permalink
sockets: skip tests that require root
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jul 22, 2021
1 parent 9cbe10e commit 370f202
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sockets/unix_socket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func runTest(t *testing.T, path string, l net.Listener, echoStr string) {

// TestNewUnixSocket run under root user.
func TestNewUnixSocket(t *testing.T) {
if os.Getuid() != 0 {
t.Skip("requires root")
}
gid := os.Getgid()
path := "/tmp/test.sock"
echoStr := "hello"
Expand Down

0 comments on commit 370f202

Please sign in to comment.