LDAP: Added reload endpoint for LDAP config (#15470)
* 4843 - Added reload endpoint for LDAP config closes #4843 * Refactor to make the reload work after master drifted
This commit is contained in:
@@ -67,18 +67,18 @@ func TestMiddlewareContext(t *testing.T) {
|
||||
return true
|
||||
}
|
||||
|
||||
readLDAPConfig = func() *ldap.Config {
|
||||
getLDAPConfig = func() (*ldap.Config, error) {
|
||||
config := &ldap.Config{
|
||||
Servers: []*ldap.ServerConfig{
|
||||
{},
|
||||
},
|
||||
}
|
||||
return config
|
||||
return config, nil
|
||||
}
|
||||
|
||||
defer func() {
|
||||
isLDAPEnabled = ldap.IsEnabled
|
||||
readLDAPConfig = ldap.ReadConfig
|
||||
getLDAPConfig = ldap.GetConfig
|
||||
}()
|
||||
|
||||
store := remotecache.NewFakeStore(t)
|
||||
@@ -109,16 +109,16 @@ func TestMiddlewareContext(t *testing.T) {
|
||||
return true
|
||||
}
|
||||
|
||||
readLDAPConfig = func() *ldap.Config {
|
||||
getLDAPConfig = func() (*ldap.Config, error) {
|
||||
config := &ldap.Config{
|
||||
Servers: []*ldap.ServerConfig{},
|
||||
}
|
||||
return config
|
||||
return config, nil
|
||||
}
|
||||
|
||||
defer func() {
|
||||
isLDAPEnabled = ldap.IsEnabled
|
||||
readLDAPConfig = ldap.ReadConfig
|
||||
getLDAPConfig = ldap.GetConfig
|
||||
}()
|
||||
|
||||
store := remotecache.NewFakeStore(t)
|
||||
|
||||
Reference in New Issue
Block a user