mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-28 02:18:43 +00:00
make sure the test can work if no config file loaded
This commit is contained in:
@@ -97,9 +97,17 @@ func init() {
|
||||
db.store.InitUserApps()
|
||||
var cfg Config
|
||||
cfile := "../databunker.yaml"
|
||||
readConfFile(&cfg, &cfile)
|
||||
err = readConfFile(&cfg, &cfile)
|
||||
cfg.SelfService.AppRecordChange = []string{"testapp", "super"}
|
||||
cfg.Generic.CreateUserWithoutAccessToken = true
|
||||
if err != nil {
|
||||
cfg.SelfService.ForgetMe = false
|
||||
cfg.SelfService.UserRecordChange = true
|
||||
cfg.Generic.CreateUserWithoutAccessToken = true
|
||||
cfg.Policy.MaxUserRetentionPeriod = "1m"
|
||||
cfg.Policy.MaxAuditRetentionPeriod = "12m"
|
||||
cfg.Policy.MaxSessionRetentionPeriod = "1h"
|
||||
cfg.Policy.MaxShareableRecordRetentionPeriod = "1m"
|
||||
}
|
||||
e := mainEnv{db, cfg, make(chan struct{})}
|
||||
rootToken2, err := e.db.getRootXtoken()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user