Skip to content

Commit

Permalink
Merge pull request #15 from kanmu/chore/use_test_pkg
Browse files Browse the repository at this point in the history
chore: Use pgtxdb_test package
  • Loading branch information
winebarrel authored Nov 25, 2024
2 parents cdeb9cf + dc787fa commit 84bca5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions db_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pgtxdb
package pgtxdb_test

import (
"database/sql"
Expand All @@ -8,10 +8,11 @@ import (
"testing"

_ "github.com/jackc/pgx/v5/stdlib" // pgx
"github.com/kanmu/pgtxdb"
)

func init() {
Register("pgtxdb", "pgx", "postgres://pgtxdbtest@localhost:5432/pgtxdbtest?sslmode=disable")
pgtxdb.Register("pgtxdb", "pgx", "postgres://pgtxdbtest@localhost:5432/pgtxdbtest?sslmode=disable")
}

func TestShouldRunWithinTransaction(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pgtxdb
package pgtxdb_test

import (
"database/sql"
Expand Down

0 comments on commit 84bca5e

Please sign in to comment.