Skip to content

Commit

Permalink
update: test_utils connection string
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettiOverload committed Aug 25, 2023
1 parent 5e4334b commit df42f1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import (
)

func NewTestDb(schema string) (*database.Db, error) {
connStr := fmt.Sprintf("postgresql://bdjuno:password@localhost:6433/bdjuno?sslmode=disable&search_path=%s", schema)
dbCfg := dbconfig.NewDatabaseConfig(
"postgresql://bdjuno:password@localhost:6433/bdjuno?sslmode=disable&search_path=public",
connStr,
"",
"",
"",
Expand Down Expand Up @@ -61,6 +62,12 @@ func NewTestDb(schema string) (*database.Db, error) {
return err
}

// Create a default partition for the transaction table
_, err = bigDipperDb.SQL.Exec(fmt.Sprintf(`CREATE TABLE IF NOT EXISTS %s.transaction_default PARTITION OF transaction DEFAULT;`, schema))
if err != nil {
return err
}

return nil
})

Expand Down

0 comments on commit df42f1f

Please sign in to comment.