Skip to content

Commit

Permalink
renaming package and updating driver name
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Kumar T P committed Oct 7, 2020
1 parent 19826a1 commit 086a9b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions internal/pgutil/parser_test.go
Expand Up @@ -21,9 +21,11 @@ import (
"os"
"testing"

apmpq "go.elastic.co/apm/module/apmsql/pq"

"github.com/stretchr/testify/assert"

apmpq "go.elastic.co/apm/internal/pgutil"
"go.elastic.co/apm/internal/pgutil"
"go.elastic.co/apm/module/apmsql"
)

Expand All @@ -44,7 +46,7 @@ func TestParseDSNURL(t *testing.T) {
}

test := func(url, addr string, port int) {
info := apmpq.ParseDSN(url)
info := pgutil.ParseDSN(url)
assert.Equal(t, apmsql.DSNInfo{
Address: addr,
Port: port,
Expand Down
2 changes: 1 addition & 1 deletion module/apmsql/pgxv4/init.go
Expand Up @@ -28,5 +28,5 @@ import (
)

func init() {
apmsql.Register("pgxv4", &stdlib.Driver{}, apmsql.WithDSNParser(pgutil.ParseDSN))
apmsql.Register("pgx", &stdlib.Driver{}, apmsql.WithDSNParser(pgutil.ParseDSN))
}
2 changes: 1 addition & 1 deletion module/apmsql/pgxv4/pq_test.go
Expand Up @@ -38,7 +38,7 @@ func TestQueryContext(t *testing.T) {
t.Skipf("PGHOST not specified")
}

db, err := apmsql.Open("pgxv4", "user=postgres password=hunter2 dbname=test_db sslmode=disable")
db, err := apmsql.Open("pgx", "user=postgres password=hunter2 dbname=test_db sslmode=disable")
require.NoError(t, err)
defer db.Close()

Expand Down

0 comments on commit 086a9b6

Please sign in to comment.