Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: added validation test case, unable to reproduce #524 #704

Merged
merged 1 commit into from
Sep 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ func TestGet(t *testing.T) {
logResponse(t, resp)
}

func TestGetGH524(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()

resp, err := dc().R().
SetPathParams((map[string]string{
"userId": "sample@sample.com",
"subAccountId": "100002",
"path": "groups/developers",
})).
SetQueryParam("request_no", strconv.FormatInt(time.Now().Unix(), 10)).
SetDebug(true).
Get(ts.URL + "/v1/users/{userId}/{subAccountId}/{path}/details")

assertError(t, err)
assertEqual(t, http.StatusOK, resp.StatusCode())
assertEqual(t, resp.Request.Header.Get("Content-Type"), "") // unable to reproduce reported issue
}

func TestIllegalRetryCount(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()
Expand Down