1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove dependency on 'os/user', which cannot be used with CGO_ENABLED=0. This allows running the tests without CGO.

This commit is contained in:
Solomon Hykes 2013-06-21 19:40:42 -07:00
parent ecd1fff9b0
commit ce9e50f4ee

View file

@ -8,10 +8,10 @@ import (
"log"
"net"
"os"
"os/user"
"strconv"
"strings"
"sync"
"syscall"
"testing"
"time"
)
@ -49,10 +49,8 @@ func init() {
return
}
if usr, err := user.Current(); err != nil {
panic(err)
} else if usr.Uid != "0" {
panic("docker tests needs to be run as root")
if uid := syscall.Geteuid(); uid != 0 {
log.Fatal("docker tests needs to be run as root")
}
NetworkBridgeIface = "testdockbr0"