Update TestHTTPServer_UnixSocket with DialContext
This commit is contained in:
parent
726590367f
commit
15314c96d0
|
@ -2,6 +2,7 @@ package agent
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -119,7 +120,7 @@ func TestHTTPServer_UnixSocket(t *testing.T) {
|
|||
// Ensure we can get a response from the socket.
|
||||
path, _ := unixSocketAddr(srv.agent.config.Addresses.HTTP)
|
||||
trans := cleanhttp.DefaultTransport()
|
||||
trans.Dial = func(_, _ string) (net.Conn, error) {
|
||||
trans.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) {
|
||||
return net.Dial("unix", path)
|
||||
}
|
||||
client := &http.Client{
|
||||
|
|
Loading…
Reference in New Issue