diff --git a/test/porter/client.go b/test/porter/client.go index 34d3579e9e..b340b68ee3 100644 --- a/test/porter/client.go +++ b/test/porter/client.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net/http" "os" + "strings" ) var DefaultAddr = "127.0.0.1:7965" @@ -23,6 +24,9 @@ func RandomPorts(n int) ([]int, error) { } resp, err := http.Get(fmt.Sprintf("http://%s/%d", addr, n)) if err != nil { + if strings.Contains(err.Error(), "connection refused") { + return nil, fmt.Errorf("Are you running porter?\nInstall with 'go install github.com/hashicorp/consul/test/porter/cmd/porter'\nThen run 'porter go test ...'\n%s", err) + } return nil, err } defer resp.Body.Close()