Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ func runNewTestClient(ctx context.Context, t *testing.T, config *Config) *Client
)
config.Schema = schema

// TODO(brandur): It'd be better if we could reuse the driver object here,
// but it'll take a lot of unwinding of all these test helpers.
client := newTestClient(t, dbPool, config)
client, err := NewClient(driver, config)
require.NoError(t, err)

startClient(ctx, t, client)

return client
Expand Down Expand Up @@ -199,6 +199,7 @@ func Test_Client_Common(t *testing.T) {
type testBundle struct {
config *Config
dbPool *pgxpool.Pool
driver *riverpgxv5.Driver
schema string
}

Expand All @@ -216,6 +217,7 @@ func Test_Client_Common(t *testing.T) {
return config, &testBundle{
config: config,
dbPool: dbPool,
driver: driver,
schema: schema,
}
}
Expand All @@ -225,10 +227,10 @@ func Test_Client_Common(t *testing.T) {

config, bundle := setupConfig(t)

// TODO(brandur): It'd be better if we could reuse the driver object
// from setupConfig here, but it'll take a lot of unwinding of all
// these test helpers.
return newTestClient(t, bundle.dbPool, config), bundle
client, err := NewClient(bundle.driver, config)
require.NoError(t, err)

return client, bundle
}

t.Run("StartInsertAndWork", func(t *testing.T) {
Expand Down
Loading