MCPcopy Create free account
hub / github.com/nginx-proxy/docker-gen / TestDockerHostEndpoint

Function TestDockerHostEndpoint

internal/dockerclient/docker_cli_test.go:27–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func TestDockerHostEndpoint(t *testing.T) {
28 err := os.Setenv("DOCKER_HOST", "tcp://127.0.0.1:4243")
29 if err != nil {
30 t.Fatalf("Unable to set DOCKER_HOST: %s", err)
31 }
32
33 endpoint, err := GetEndpoint("")
34 if err != nil {
35 t.Fatalf("%s", err)
36 }
37
38 if endpoint != "tcp://127.0.0.1:4243" {
39 t.Fatalf("Expected tcp://127.0.0.1:4243, got %s", endpoint)
40 }
41}
42
43func TestDockerFlagEndpoint(t *testing.T) {
44

Callers

nothing calls this directly

Calls 1

GetEndpointFunction · 0.85

Tested by

no test coverage detected