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 1
1
package main
2
2
3
3
import (
4
- "errors"
5
4
"os"
6
5
)
7
6
@@ -15,21 +14,10 @@ func getEndpoint() (string, error) {
15
14
defaultEndpoint = endpoint
16
15
}
17
16
18
- proto , host , err := parseHost (defaultEndpoint )
17
+ _ , _ , err := parseHost (defaultEndpoint )
19
18
if err != nil {
20
19
return "" , err
21
20
}
22
21
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
-
34
22
return defaultEndpoint , nil
35
23
}
Original file line number Diff line number Diff line change @@ -55,20 +55,6 @@ func TestDockerFlagEndpoint(t *testing.T) {
55
55
}
56
56
}
57
57
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
-
72
58
func TestUnixBadFormat (t * testing.T ) {
73
59
endpoint = "unix:/var/run/docker.sock"
74
60
_ , err := getEndpoint ()
You can’t perform that action at this time.
0 commit comments