Skip to content

Commit

Permalink
test: skip bodyclose linter when response is asserted nil
Browse files Browse the repository at this point in the history
  • Loading branch information
alespour committed Aug 21, 2024
1 parent 65ffee5 commit 66ac2cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions influxdb3/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func TestResolveErrorMessage(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand All @@ -428,7 +428,7 @@ func TestResolveErrorHTML(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand All @@ -453,7 +453,7 @@ func TestResolveErrorRetryAfter(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand All @@ -478,7 +478,7 @@ func TestResolveErrorWrongJsonResponse(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand All @@ -502,7 +502,7 @@ func TestResolveErrorEdge(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand All @@ -527,7 +527,7 @@ func TestResolveErrorEdgeWithData(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand All @@ -548,7 +548,7 @@ func TestResolveErrorNoError(t *testing.T) {
require.NoError(t, err)
turl, err := url.Parse(ts.URL)
require.NoError(t, err)
res, err := client.makeAPICall(context.Background(), httpParams{
res, err := client.makeAPICall(context.Background(), httpParams{ //nolint:bodyclose
endpointURL: turl,
queryParams: nil,
httpMethod: "GET",
Expand Down

0 comments on commit 66ac2cd

Please sign in to comment.