data provider: remove default admin

you need to load initial data or set "create_default_admin" to true
and the appropriate env vars if you don't want to use the web admin
setup screen to create the default admin
This commit is contained in:
Nicola Murino
2021-08-20 10:37:51 +02:00
parent bcf088f586
commit b903a6e46f
8 changed files with 22 additions and 14 deletions

View File

@@ -254,6 +254,8 @@ func TestMain(m *testing.M) {
// work in non atomic mode too
os.Setenv("SFTPGO_COMMON__UPLOAD_MODE", "2")
os.Setenv("SFTPGO_DATA_PROVIDER__CREATE_DEFAULT_ADMIN", "1")
os.Setenv("SFTPGO_DEFAULT_ADMIN_USERNAME", "admin")
os.Setenv("SFTPGO_DEFAULT_ADMIN_PASSWORD", "password")
err = config.LoadConfig(configDir, "")
if err != nil {
logger.ErrorToConsole("error loading configuration: %v", err)