mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 04:35:16 +01:00
Remove adminserver in sourcecode
Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
parent
36d13e8243
commit
d7798a12d2
@ -15,8 +15,6 @@
|
||||
package secret
|
||||
|
||||
const (
|
||||
// AdminserverUser is the name of adminserver user
|
||||
AdminserverUser = "harbor-adminserver"
|
||||
// JobserviceUser is the name of jobservice user
|
||||
JobserviceUser = "harbor-jobservice"
|
||||
// CoreUser is the name of ui user
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
goldap "gopkg.in/ldap.v2"
|
||||
)
|
||||
|
||||
var adminServerLdapTestConfig = map[string]interface{}{
|
||||
var ldapTestConfig = map[string]interface{}{
|
||||
common.ExtEndpoint: "host01.com",
|
||||
common.AUTHMode: "ldap_auth",
|
||||
common.DatabaseType: "postgresql",
|
||||
@ -35,7 +35,7 @@ var adminServerLdapTestConfig = map[string]interface{}{
|
||||
common.AdminInitialPassword: "password",
|
||||
}
|
||||
|
||||
var adminServerDefaultConfigWithVerifyCert = map[string]interface{}{
|
||||
var defaultConfigWithVerifyCert = map[string]interface{}{
|
||||
common.ExtEndpoint: "https://host01.com",
|
||||
common.AUTHMode: common.LDAPAuth,
|
||||
common.DatabaseType: "postgresql",
|
||||
@ -91,7 +91,7 @@ func TestMain(m *testing.M) {
|
||||
log.Fatalf("failed to initialize configurations: %v", err)
|
||||
}
|
||||
|
||||
uiConfig.Upload(adminServerLdapTestConfig)
|
||||
uiConfig.Upload(ldapTestConfig)
|
||||
|
||||
os.Exit(m.Run())
|
||||
|
||||
@ -270,11 +270,11 @@ func TestSession_SearchGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
ldapConfig := models.LdapConf{
|
||||
LdapURL: adminServerLdapTestConfig[common.LDAPURL].(string) + ":389",
|
||||
LdapSearchDn: adminServerLdapTestConfig[common.LDAPSearchDN].(string),
|
||||
LdapURL: ldapTestConfig[common.LDAPURL].(string) + ":389",
|
||||
LdapSearchDn: ldapTestConfig[common.LDAPSearchDN].(string),
|
||||
LdapScope: 2,
|
||||
LdapSearchPassword: adminServerLdapTestConfig[common.LDAPSearchPwd].(string),
|
||||
LdapBaseDn: adminServerLdapTestConfig[common.LDAPBaseDN].(string),
|
||||
LdapSearchPassword: ldapTestConfig[common.LDAPSearchPwd].(string),
|
||||
LdapBaseDn: ldapTestConfig[common.LDAPBaseDN].(string),
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@ -311,11 +311,11 @@ func TestSession_SearchGroup(t *testing.T) {
|
||||
|
||||
func TestSession_SearchGroupByDN(t *testing.T) {
|
||||
ldapConfig := models.LdapConf{
|
||||
LdapURL: adminServerLdapTestConfig[common.LDAPURL].(string) + ":389",
|
||||
LdapSearchDn: adminServerLdapTestConfig[common.LDAPSearchDN].(string),
|
||||
LdapURL: ldapTestConfig[common.LDAPURL].(string) + ":389",
|
||||
LdapSearchDn: ldapTestConfig[common.LDAPSearchDN].(string),
|
||||
LdapScope: 2,
|
||||
LdapSearchPassword: adminServerLdapTestConfig[common.LDAPSearchPwd].(string),
|
||||
LdapBaseDn: adminServerLdapTestConfig[common.LDAPBaseDN].(string),
|
||||
LdapSearchPassword: ldapTestConfig[common.LDAPSearchPwd].(string),
|
||||
LdapBaseDn: ldapTestConfig[common.LDAPBaseDN].(string),
|
||||
}
|
||||
ldapGroupConfig := models.LdapGroupConf{
|
||||
LdapGroupBaseDN: "ou=group,dc=example,dc=com",
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var adminServerTestConfig = map[string]interface{}{
|
||||
var testConfig = map[string]interface{}{
|
||||
common.DefaultCoreEndpoint: "test",
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
test.InitDatabaseFromEnv()
|
||||
config.Init()
|
||||
config.Upload(adminServerTestConfig)
|
||||
config.Upload(testConfig)
|
||||
os.Exit(m.Run())
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
coreConfig "github.com/goharbor/harbor/src/core/config"
|
||||
)
|
||||
|
||||
var adminServerTestConfig = map[string]interface{}{
|
||||
var testConfig = map[string]interface{}{
|
||||
common.ExtEndpoint: "host01.com",
|
||||
common.AUTHMode: "db_auth",
|
||||
common.DatabaseType: "postgresql",
|
||||
@ -68,7 +68,7 @@ func TestMain(m *testing.M) {
|
||||
log.Fatalf("failed to initialize configurations: %v", err)
|
||||
}
|
||||
|
||||
config.Upload(adminServerTestConfig)
|
||||
config.Upload(testConfig)
|
||||
retCode := m.Run()
|
||||
os.Exit(retCode)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user