mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-27 19:43:54 +00:00
fix compilation errors for go tests
This commit is contained in:
@@ -85,7 +85,7 @@ func helpConfigurationDump(token string) ([]byte, error) {
|
||||
func init() {
|
||||
fmt.Printf("**INIT*TEST*CODE***\n")
|
||||
testDBFile := storage.CreateTestDB()
|
||||
db, myRootToken, err := setupDB(&testDBFile)
|
||||
db, myRootToken, err := setupDB(&testDBFile, nil, "DEMO")
|
||||
if err != nil {
|
||||
//log.Panic("error %s", err.Error())
|
||||
fmt.Printf("error %s", err.Error())
|
||||
@@ -94,9 +94,8 @@ func init() {
|
||||
db.store.InitUserApps()
|
||||
var cfg2 Config
|
||||
cfile := "../databunker.yaml"
|
||||
readFile(&cfg2, &cfile)
|
||||
readConfFile(&cfg2, &cfile)
|
||||
var cfg Config
|
||||
cfg.Sms.TwilioToken = "ttoken"
|
||||
cfg.SelfService.AppRecordChange = []string{"testapp", "super"}
|
||||
cfg.Generic.CreateUserWithoutAccessToken = true
|
||||
cfg.Policy.MaxAuditRetentionPeriod = "1m"
|
||||
|
||||
@@ -107,9 +107,6 @@ func TestSMS(t *testing.T) {
|
||||
client := server.Client()
|
||||
domain := server.URL
|
||||
var cfg Config
|
||||
cfg.Sms.TwilioToken = "ttoken"
|
||||
cfg.Sms.TwilioAccount = "taccount"
|
||||
cfg.Sms.TwilioFrom = "from1234"
|
||||
sendCodeByPhoneDo(domain, client, 1234, "4444", cfg)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user