mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Case insensitive ids duplicate usagestats (#50724)
* WIP * update for prometheus * usagestats: tests pass for user duplicate entries * metrics: added duplicate user entries * usagestats: adds metrics gauge for duplicate users * usagestats: skip test for mysql * sql in oneplace * only use prometheus register to not panic * usagestats: RegisterMetricsFunc with loginstats * fix: remove unused commited code * refactor: move test to authinfoservice * Update pkg/models/stats.go Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * removed prometheus metrics, due to sql cpu requirement * Added: has_duplicate_user_entries and fix tests * remove unused test * fix: empty else statement removal * missing argument to authinfoservice Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
||||
)
|
||||
|
||||
type OrgListResponse []struct {
|
||||
@@ -72,6 +73,10 @@ func (m *SQLStoreMock) GetSystemStats(ctx context.Context, query *models.GetSyst
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) GetDialect() migrator.Dialect {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) HasEditPermissionInFolders(ctx context.Context, query *models.HasEditPermissionInFoldersQuery) error {
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user