Login: refactor auth info package (#78459)

* Remove unused stats and metrics

* No longer collect metrics

* Remove unused dependency

* Move database from sub package
This commit is contained in:
Karl Persson
2023-11-21 14:47:23 +01:00
committed by GitHub
parent d85f03ec26
commit 1eb19befaa
22 changed files with 116 additions and 402 deletions

View File

@ -31,7 +31,7 @@ import (
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/licensing"
"github.com/grafana/grafana/pkg/services/login"
"github.com/grafana/grafana/pkg/services/login/logintest"
"github.com/grafana/grafana/pkg/services/login/authinfotest"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/quota/quotatest"
"github.com/grafana/grafana/pkg/services/search"
@ -164,7 +164,7 @@ type scenarioContext struct {
url string
userAuthTokenService *authtest.FakeUserAuthTokenService
sqlStore db.DB
authInfoService *logintest.AuthInfoServiceFake
authInfoService *authinfotest.FakeService
dashboardVersionService dashver.Service
userService user.Service
ctxHdlr *contexthandler.ContextHandler
@ -236,7 +236,7 @@ func setupSimpleHTTPServer(features *featuremgmt.FeatureManager) *HTTPServer {
License: &licensing.OSSLicensingService{},
AccessControl: acimpl.ProvideAccessControl(cfg),
annotationsRepo: annotationstest.NewFakeAnnotationsRepo(),
authInfoService: &logintest.AuthInfoServiceFake{
authInfoService: &authinfotest.FakeService{
ExpectedLabels: map[int64]string{int64(1): login.GetAuthProviderLabel(login.LDAPAuthModule)},
},
}