|
@@ -14,14 +14,18 @@ func TestParseHost(t *testing.T) {
|
|
|
"0.0.0.0": "Invalid bind address format: 0.0.0.0",
|
|
|
"tcp://": "Invalid proto, expected tcp: ",
|
|
|
"tcp:a.b.c.d": "Invalid bind address format: tcp:a.b.c.d",
|
|
|
+ "tcp:a.b.c.d/path": "Invalid bind address format: tcp:a.b.c.d/path",
|
|
|
"udp://127.0.0.1": "Invalid bind address format: udp://127.0.0.1",
|
|
|
"udp://127.0.0.1:2375": "Invalid bind address format: udp://127.0.0.1:2375",
|
|
|
}
|
|
|
valids := map[string]string{
|
|
|
- "0.0.0.1:5555": "tcp://0.0.0.1:5555",
|
|
|
- ":6666": "tcp://127.0.0.1:6666",
|
|
|
- "tcp://:7777": "tcp://127.0.0.1:7777",
|
|
|
- "": "unix:///var/run/docker.sock",
|
|
|
+ "0.0.0.1:5555": "tcp://0.0.0.1:5555",
|
|
|
+ "0.0.0.1:5555/path": "tcp://0.0.0.1:5555/path",
|
|
|
+ ":6666": "tcp://127.0.0.1:6666",
|
|
|
+ ":6666/path": "tcp://127.0.0.1:6666/path",
|
|
|
+ "tcp://:7777": "tcp://127.0.0.1:7777",
|
|
|
+ "tcp://:7777/path": "tcp://127.0.0.1:7777/path",
|
|
|
+ "": "unix:///var/run/docker.sock",
|
|
|
"unix:///run/docker.sock": "unix:///run/docker.sock",
|
|
|
"unix://": "unix:///var/run/docker.sock",
|
|
|
"fd://": "fd://",
|