Skip to content

Commit 0c28a0e

Browse files
committed
ignore resposne
1 parent 79803bc commit 0c28a0e

File tree

1 file changed

+2
-5
lines changed
  • coderd/coderdtest/oidctest

1 file changed

+2
-5
lines changed

coderd/coderdtest/oidctest/idp.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ func (f *FakeIDP) LoginWithClient(t testing.TB, client *codersdk.Client, idToken
358358

359359
// ExternalLogin does the oauth2 flow for external auth providers. This requires
360360
// an authenticated coder client.
361-
func (f *FakeIDP) ExternalLogin(t testing.TB, client *codersdk.Client, opts ...func(r *http.Request)) *http.Response {
361+
func (f *FakeIDP) ExternalLogin(t testing.TB, client *codersdk.Client, opts ...func(r *http.Request)) {
362362
coderOauthURL, err := client.URL.Parse(fmt.Sprintf("/external-auth/%s/callback", f.externalProviderID))
363363
require.NoError(t, err)
364364
f.SetRedirect(t, coderOauthURL.String())
@@ -394,10 +394,7 @@ func (f *FakeIDP) ExternalLogin(t testing.TB, client *codersdk.Client, opts ...f
394394
res, err := cli.Do(req)
395395
require.NoError(t, err)
396396
require.Equal(t, http.StatusOK, res.StatusCode, "client failed to login")
397-
t.Cleanup(func() {
398-
res.Body.Close()
399-
})
400-
return res
397+
_ = res.Body.Close()
401398
}
402399

403400
// OIDCCallback will emulate the IDP redirecting back to the Coder callback.

0 commit comments

Comments
 (0)