mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Add request context to UserInfo calls (#70007)
* use context for UserInfo requests * set timeouts for oauth http client * Update pkg/login/social/common.go Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> --------- Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package social
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
@@ -81,7 +82,7 @@ func TestSocialGrafanaCom_UserInfo(t *testing.T) {
|
||||
}
|
||||
}))
|
||||
provider.url = ts.URL
|
||||
actualResult, err := provider.UserInfo(ts.Client(), nil)
|
||||
actualResult, err := provider.UserInfo(context.Background(), ts.Client(), nil)
|
||||
if test.ExpectedError != nil {
|
||||
require.Equal(t, err, test.ExpectedError)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user