mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 21:44:30 +08:00
Feature: LDAP refactoring (#16950)
* incapsulates multipleldap logic under one module * abstracts users upsert and get logic * changes some of the text error messages and import sort sequence * heavily refactors the LDAP module – LDAP module now only deals with LDAP related behaviour * integrates affected auth_proxy module and their tests * refactoring of the auth_proxy logic
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/go-sql-driver/mysql"
|
||||
@ -280,7 +279,14 @@ func (ss *SqlStore) readConfig() {
|
||||
ss.dbCfg.CacheMode = sec.Key("cache_mode").MustString("private")
|
||||
}
|
||||
|
||||
func InitTestDB(t *testing.T) *SqlStore {
|
||||
// Interface of arguments for testing db
|
||||
type ITestDB interface {
|
||||
Helper()
|
||||
Fatalf(format string, args ...interface{})
|
||||
}
|
||||
|
||||
// InitTestDB initiliaze test DB
|
||||
func InitTestDB(t ITestDB) *SqlStore {
|
||||
t.Helper()
|
||||
sqlstore := &SqlStore{}
|
||||
sqlstore.skipEnsureAdmin = true
|
||||
|
Reference in New Issue
Block a user