Update TestHTTPServer_UnixSocket with DialContext

This commit is contained in:
Jeff Mitchell 2017-02-10 21:29:42 -05:00
parent 726590367f
commit 15314c96d0
1 changed files with 2 additions and 1 deletions

View File

@ -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{