Skip to content

Commit

Permalink
fix: adapt to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NoyException committed Dec 23, 2024
1 parent f340743 commit df19651
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions catalog/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ func (prov *DatabaseProvider) CreateCatalog(dbFile string) (bool, error) {
}

storage := stdsql.OpenDB(connector)
prov.initCatalog(connector, storage)
err = prov.initCatalog(connector, storage)
if err != nil {
return false, err
}
storage.Close()
connector.Close()
return true, nil
Expand Down Expand Up @@ -219,7 +222,10 @@ func (prov *DatabaseProvider) SwitchCatalog(dbFile string) error {

// in memory database needs to be initialized every time
if dsn == "" {
prov.initCatalog(connector, storage)
err = prov.initCatalog(connector, storage)
if err != nil {
return err
}
}

prov.mu.Lock()
Expand Down

0 comments on commit df19651

Please sign in to comment.