chore: fix tests

This commit is contained in:
Steven 2023-12-17 20:10:12 +08:00
parent 4c66edc170
commit 6eb3ff412d

View File

@ -22,9 +22,11 @@ func NewTestingStore(ctx context.Context, t *testing.T) *store.Store {
if err := dbDriver.Migrate(ctx); err != nil {
fmt.Printf("failed to migrate db, error: %+v\n", err)
}
if profile.Driver == "postgres" {
if err := dbDriver.Seed(ctx); err != nil {
fmt.Printf("failed to seed db, error: %+v\n", err)
}
}
store := store.New(dbDriver, profile)
return store