diff --git a/admin_test.go b/admin_test.go index 47172a3..6648993 100644 --- a/admin_test.go +++ b/admin_test.go @@ -64,7 +64,7 @@ func Test_GetAdminQueriesOutdated_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodGet, "https://redash.example.com/api/admin/queries/outdated", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) @@ -261,7 +261,7 @@ func Test_GetAdminQueriesRqStatus_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodGet, "https://redash.example.com/api/admin/queries/rq_status", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) diff --git a/alert_test.go b/alert_test.go index 5a85e29..34f8045 100644 --- a/alert_test.go +++ b/alert_test.go @@ -98,7 +98,7 @@ func Test_ListAlerts_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodGet, "https://redash.example.com/api/alerts", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) @@ -189,7 +189,7 @@ func Test_GetAlert_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodGet, "https://redash.example.com/api/alerts/1", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) @@ -305,7 +305,7 @@ func Test_CreateAlert_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodPost, "https://redash.example.com/api/alerts", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) @@ -432,7 +432,7 @@ func Test_UpdateAlert_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodPost, "https://redash.example.com/api/alerts/1", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) diff --git a/ping_test.go b/ping_test.go index 1413cb2..2f5ff96 100644 --- a/ping_test.go +++ b/ping_test.go @@ -79,7 +79,7 @@ func Test_Ping_IOErr(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder(http.MethodGet, "https://redash.example.com/ping", func(req *http.Request) (*http.Response, error) { - return ioErrResp, nil + return testIOErrResp, nil }) client, _ := redash.NewClient("https://redash.example.com", testRedashAPIKey) diff --git a/redash_go_test.go b/redash_go_test.go index 813113b..cf8e1a6 100644 --- a/redash_go_test.go +++ b/redash_go_test.go @@ -11,8 +11,8 @@ import ( ) var ( - testAcc = false - ioErrResp = &http.Response{ + testAcc = false + testIOErrResp = &http.Response{ Status: strconv.Itoa(http.StatusOK), StatusCode: http.StatusOK, Body: io.NopCloser(iotest.ErrReader(errors.New("IO error"))),