Skip to content

Commit a8f5e91

Browse files
committed
Fixing tests
1 parent f6bd8f3 commit a8f5e91

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ func NewVersionedClient(endpoint string, apiVersionString string) (*Client, erro
223223
}
224224

225225
func (c *Client) WithTransport(tr *http.Transport) {
226-
c.initializeNativeClientTransport(tr)
227-
c.HTTPClient = &http.Client{Transport: tr}
226+
initializeNativeClientTransport(c, tr)
227+
c.HTTPClient.Transport = tr
228228
}
229229

230230
// NewVersionnedTLSClient has been DEPRECATED, please use NewVersionedTLSClient.

client_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ func (c *Client) initializeNativeClient() {
1919
return
2020
}
2121
tr := defaultTransport()
22-
c.initializeNativeClientTransport(tr)
22+
initializeNativeClientTransport(c, tr)
2323
}
2424

25-
func (c *Client) initializeNativeClientTransport(tr *http.Transport) {
25+
func initializeNativeClientTransport(c *Client, tr *http.Transport) {
2626
sockPath := c.endpointURL.Path
2727
tr.Dial = func(network, addr string) (net.Conn, error) {
2828
return c.Dialer.Dial(unixProtocol, sockPath)

0 commit comments

Comments
 (0)