File tree Expand file tree Collapse file tree 2 files changed +1
-27
lines changed
Expand file tree Collapse file tree 2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change 11package main
22
33import (
4- "errors"
54 "os"
65)
76
@@ -15,21 +14,10 @@ func getEndpoint() (string, error) {
1514 defaultEndpoint = endpoint
1615 }
1716
18- proto , host , err := parseHost (defaultEndpoint )
17+ _ , _ , err := parseHost (defaultEndpoint )
1918 if err != nil {
2019 return "" , err
2120 }
2221
23- if proto == "unix" {
24- exist , err := exists (host )
25- if err != nil {
26- return "" , err
27- }
28-
29- if ! exist {
30- return "" , errors .New (host + " does not exist" )
31- }
32- }
33-
3422 return defaultEndpoint , nil
3523}
Original file line number Diff line number Diff line change @@ -55,20 +55,6 @@ func TestDockerFlagEndpoint(t *testing.T) {
5555 }
5656}
5757
58- func TestUnixNotExists (t * testing.T ) {
59-
60- endpoint = ""
61- err := os .Setenv ("DOCKER_HOST" , "unix:///does/not/exist" )
62- if err != nil {
63- t .Fatalf ("Unable to set DOCKER_HOST: %s" , err )
64- }
65-
66- _ , err = getEndpoint ()
67- if err == nil {
68- t .Fatal ("endpoint should have failed" )
69- }
70- }
71-
7258func TestUnixBadFormat (t * testing.T ) {
7359 endpoint = "unix:/var/run/docker.sock"
7460 _ , err := getEndpoint ()
You can’t perform that action at this time.
0 commit comments