@@ -358,7 +358,7 @@ func (f *FakeIDP) LoginWithClient(t testing.TB, client *codersdk.Client, idToken
358
358
359
359
// ExternalLogin does the oauth2 flow for external auth providers. This requires
360
360
// 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 )) {
362
362
coderOauthURL ,err := client .URL .Parse (fmt .Sprintf ("/external-auth/%s/callback" ,f .externalProviderID ))
363
363
require .NoError (t ,err )
364
364
f .SetRedirect (t ,coderOauthURL .String ())
@@ -394,10 +394,7 @@ func (f *FakeIDP) ExternalLogin(t testing.TB, client *codersdk.Client, opts ...f
394
394
res ,err := cli .Do (req )
395
395
require .NoError (t ,err )
396
396
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 ()
401
398
}
402
399
403
400
// OIDCCallback will emulate the IDP redirecting back to the Coder callback.