MCPcopy
hub / github.com/docker/compose / TestProxyTransport_NilWhenSocketMissing

Function TestProxyTransport_NilWhenSocketMissing

internal/desktop/proxy_test.go:90–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestProxyTransport_NilWhenSocketMissing(t *testing.T) {
91 // no httpproxy.sock created
92 dir := t.TempDir()
93 cliSock := filepath.Join(dir, "docker-cli.sock")
94 mustTouch(t, cliSock)
95
96 assert.Assert(t, ProxyTransport("unix://"+cliSock) == nil,
97 "must return nil when DD endpoint is set but proxy socket is missing, not a transport that would dial a dead socket")
98}
99
100func TestProxyTransport_RoutesThroughDockerDesktop(t *testing.T) {
101 if runtime.GOOS == "windows" {

Callers

nothing calls this directly

Calls 3

mustTouchFunction · 0.85
ProxyTransportFunction · 0.85
TempDirMethod · 0.80

Tested by

no test coverage detected