Skip to content

Commit 2718338

Browse files
committed
Small test adjustment
1 parent a5e7694 commit 2718338

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

httputilx/httputilx_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,11 @@ func TestDoExponentialBackoff(t *testing.T) {
384384
}))
385385
defer ts.Close()
386386

387-
req, err := http.NewRequest(http.MethodGet, ts.URL, tt.requestBody)
387+
method := http.MethodGet
388+
if tt.requestBody != nil {
389+
method = http.MethodPost
390+
}
391+
req, err := http.NewRequest(method, ts.URL, tt.requestBody)
388392
if err != nil {
389393
t.Fatalf("failed to create request: %v", err)
390394
}

0 commit comments

Comments
 (0)