Fix database tests
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
5a93761af7
commit
f66f95baff
6 changed files with 52 additions and 8 deletions
|
|
@ -30,6 +30,7 @@ import (
|
|||
|
||||
"github.com/cloudbase/garm/auth"
|
||||
dbCommon "github.com/cloudbase/garm/database/common"
|
||||
"github.com/cloudbase/garm/database/watcher"
|
||||
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||
"github.com/cloudbase/garm/params"
|
||||
)
|
||||
|
|
@ -78,7 +79,13 @@ func (s *OrgTestSuite) assertSQLMockExpectations() {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *OrgTestSuite) TearDownTest() {
|
||||
watcher.CloseWatcher()
|
||||
}
|
||||
|
||||
func (s *OrgTestSuite) SetupTest() {
|
||||
ctx := context.Background()
|
||||
watcher.InitWatcher(ctx)
|
||||
// create testing sqlite database
|
||||
dbConfig := garmTesting.GetTestSqliteDBConfig(s.T())
|
||||
db, err := NewSQLDatabase(context.Background(), dbConfig)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue