Skip to content

Commit

Permalink
NewSqlxDB -> NewTestDB, DbUrlOrInMemory -> TestURL
Browse files Browse the repository at this point in the history
  • Loading branch information
reductionista committed Dec 11, 2024
1 parent 1910bfb commit 9d620c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sqlutil/pg/pg.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
)

func NewSqlxDB(t testing.TB, dbURL string) *sqlx.DB {
func NewTestDB(t testing.TB, dbURL string) *sqlx.DB {
err := RegisterTxDb(dbURL)
if err != nil {
t.Fatalf("failed to register txdb dialect: %s", err.Error())
Expand All @@ -25,7 +25,7 @@ func NewSqlxDB(t testing.TB, dbURL string) *sqlx.DB {
return db
}

func DbUrlOrInMemory(t testing.TB) string {
func TestURL(t testing.TB) string {
dbURL, ok := os.LookupEnv("CL_DATABASE_URL")
if ok {
return dbURL
Expand Down

0 comments on commit 9d620c3

Please sign in to comment.