mirror of
https://github.com/harness/drone.git
synced 2025-05-09 21:13:04 +08:00
fixed docker test to use new default port
This commit is contained in:
parent
cc87e7a1fa
commit
7fed5f5de6
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHostFromEnv(t *testing.T) {
|
||||
os.Setenv("DOCKER_HOST", "tcp://1.1.1.1:4243")
|
||||
os.Setenv("DOCKER_HOST", "tcp://1.1.1.1:2375")
|
||||
defer os.Setenv("DOCKER_HOST", "")
|
||||
|
||||
client := New()
|
||||
@ -16,18 +16,18 @@ func TestHostFromEnv(t *testing.T) {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
if client.addr != "1.1.1.1:4243" {
|
||||
if client.addr != "1.1.1.1:2375" {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestInvalidHostFromEnv(t *testing.T) {
|
||||
os.Setenv("DOCKER_HOST", "tcp:1.1.1.1:4243") // missing tcp:// prefix
|
||||
os.Setenv("DOCKER_HOST", "tcp:1.1.1.1:2375") // missing tcp:// prefix
|
||||
defer os.Setenv("DOCKER_HOST", "")
|
||||
|
||||
client := New()
|
||||
|
||||
if client.addr == "1.1.1.1:4243" {
|
||||
if client.addr == "1.1.1.1:2375" {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
@ -61,7 +61,7 @@ func TestDefaultTcpHost(t *testing.T) {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
if client.addr != "0.0.0.0:4243" {
|
||||
if client.addr != "0.0.0.0:2375" {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user