Fix GetLocalHost testutil function for mac users (boot2docker)
This commit is contained in:
@@ -23,4 +23,12 @@ func TestDockerHost(t *testing.T) {
|
||||
t.Fatalf("Host should take DOCKER_HOST value when set. Current value is [%s] and DOCKER_HOST is [%s]", host, os.Getenv("DOCKER_HOST"))
|
||||
}
|
||||
|
||||
os.Setenv("DOCKER_HOST", "tcp://1.1.1.1:8080")
|
||||
|
||||
host = GetLocalHost()
|
||||
|
||||
if host != "1.1.1.1" {
|
||||
t.Fatalf("Host should take DOCKER_HOST value when set. Current value is [%s] and DOCKER_HOST is [%s]", host, os.Getenv("DOCKER_HOST"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user