Skip to content

Commit 27e4230

Browse files
committed
[test] parse flags from ENV
1 parent 7f8eeac commit 27e4230

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/internal/db.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package internal
22

33
import (
44
"github.com/cSploit/daemon/config"
5+
"github.com/ianschenck/envflag"
56
"github.com/jinzhu/gorm"
67
_ "github.com/jinzhu/gorm/dialects/sqlite"
78
"sync"
@@ -53,6 +54,8 @@ func ClearDb() {
5354

5455
func OpenDbForTests() {
5556
once.Do(func() {
57+
envflag.Parse()
58+
5659
if err := config.Load(); err != nil {
5760
panic(err)
5861
}

0 commit comments

Comments
 (0)