Fix tests to pass on linux

This commit is contained in:
bel
2020-03-13 03:40:53 +00:00
parent 6d39ef9aa2
commit 0d6be1e9d8
6 changed files with 185 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ var (
StoreUser string
StorePass string
Root string
Config string
)
func init() {
@@ -36,6 +37,7 @@ func Refresh() {
as.Append(args.STRING, "storeuser", "storage username", "")
as.Append(args.STRING, "storepass", "storage password", "")
as.Append(args.STRING, "root", "root for static files", "./public")
as.Append(args.STRING, "config", "cron config to load;; non-persisting", "")
if err := as.Parse(); err != nil {
panic(err)
}
@@ -47,6 +49,11 @@ func Refresh() {
StoreUser = as.Get("storeuser").GetString()
StorePass = as.Get("storepass").GetString()
Root = as.Get("root").GetString()
Config = as.Get("config").GetString()
if Config != "" {
StoreType = "map"
}
if db, err := storage.New(storage.TypeFromString(StoreType), StoreAddr, StoreUser, StorePass); err != nil {
panic(err)