Example #1
0
// DaemonProto returns the docker server protocol for testing.
func DaemonProto() string {
	proto := os.Getenv("TEST_DAEMON_PROTO")
	if proto == "" {
		if utils.GetHostOs() == "darwin" {
			proto = "tcp"
		} else {
			proto = "unix"
		}
	}
	return proto
}
Example #2
0
// DaemonAddr returns the docker server address for testing.
func DaemonAddr() string {
	addr := os.Getenv("TEST_DAEMON_ADDR")
	if addr == "" {
		if utils.GetHostOs() == "darwin" {
			addr = "172.17.8.100:4243"
		} else {
			addr = "/var/run/docker.sock"
		}
	}
	return addr
}