diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-07 11:11:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-07 11:11:27 +0800 |
commit | 69b61d437357235700306f28d22d21acc39bb2b5 (patch) | |
tree | 33af1d4d797b428556a323837fcc3eda38a54479 /cmd/admin_auth_ldap_test.go | |
parent | c9110eb5e4657e018695f084f37e1b423939e9e0 (diff) | |
download | gitea-69b61d437357235700306f28d22d21acc39bb2b5.tar.gz gitea-69b61d437357235700306f28d22d21acc39bb2b5.zip |
Fix bug on admin subcommand (#17533)
* Fix bug on admin subcommand
* Add signals for all initDB
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'cmd/admin_auth_ldap_test.go')
-rw-r--r-- | cmd/admin_auth_ldap_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/admin_auth_ldap_test.go b/cmd/admin_auth_ldap_test.go index db1ba13bcd..15880639d6 100644 --- a/cmd/admin_auth_ldap_test.go +++ b/cmd/admin_auth_ldap_test.go @@ -5,6 +5,7 @@ package cmd import ( + "context" "testing" "code.gitea.io/gitea/models/login" @@ -207,7 +208,7 @@ func TestAddLdapBindDn(t *testing.T) { // Mock functions. var createdLoginSource *login.Source service := &authService{ - initDB: func() error { + initDB: func(context.Context) error { return nil }, createLoginSource: func(loginSource *login.Source) error { @@ -438,7 +439,7 @@ func TestAddLdapSimpleAuth(t *testing.T) { // Mock functions. var createdLoginSource *login.Source service := &authService{ - initDB: func() error { + initDB: func(context.Context) error { return nil }, createLoginSource: func(loginSource *login.Source) error { @@ -863,7 +864,7 @@ func TestUpdateLdapBindDn(t *testing.T) { // Mock functions. var updatedLoginSource *login.Source service := &authService{ - initDB: func() error { + initDB: func(context.Context) error { return nil }, createLoginSource: func(loginSource *login.Source) error { @@ -1227,7 +1228,7 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { // Mock functions. var updatedLoginSource *login.Source service := &authService{ - initDB: func() error { + initDB: func(context.Context) error { return nil }, createLoginSource: func(loginSource *login.Source) error { |