Skip to content

Commit

Permalink
fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackHay22 committed Dec 22, 2023
1 parent 4d5c6a7 commit 7d38b85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/saml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestSAMLRegistration(t *testing.T) {
Jar: jar,
}

req, err = http.NewRequest("GET", test.RedirectURL(resp), nil)
httpReq, err := http.NewRequest("GET", test.RedirectURL(resp), nil)
assert.NoError(t, err)

var formRedirectURL *url.URL
Expand All @@ -95,7 +95,7 @@ func TestSAMLRegistration(t *testing.T) {
return nil
}

res, err := client.Do(req)
res, err := client.Do(httpReq)
client.CheckRedirect = nil
assert.NoError(t, err)
assert.Equal(t, http.StatusOK, res.StatusCode)
Expand All @@ -106,11 +106,11 @@ func TestSAMLRegistration(t *testing.T) {
"password": {"user1pass"},
}

req, err = http.NewRequest("POST", formRedirectURL.String(), strings.NewReader(form.Encode()))
httpReq, err = http.NewRequest("POST", formRedirectURL.String(), strings.NewReader(form.Encode()))
assert.NoError(t, err)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

res, err = client.Do(req)
res, err = client.Do(httpReq)
assert.NoError(t, err)
assert.Equal(t, http.StatusOK, res.StatusCode)

Expand Down

0 comments on commit 7d38b85

Please sign in to comment.