MCPcopy
hub / github.com/jackc/pgx / mustConnectString

Function mustConnectString

helper_test.go:27–33  ·  view source on GitHub ↗
(t testing.TB, connString string)

Source from the content-addressed store, hash-verified

25}
26
27func mustConnectString(t testing.TB, connString string) *pgx.Conn {
28 conn, err := pgx.Connect(context.Background(), connString)
29 if err != nil {
30 t.Fatalf("Unable to establish connection: %v", err)
31 }
32 return conn
33}
34
35func mustParseConfig(t testing.TB, connString string) *pgx.ConnConfig {
36 config, err := pgx.ParseConfig(connString)

Callers 15

TestPrepareFunction · 0.85
TestPrepareBadSQLFailureFunction · 0.85
TestListenNotifyFunction · 0.85
TestFatalRxErrorFunction · 0.85
TestFatalTxErrorFunction · 0.85
TestConnInitTypeMapFunction · 0.85

Calls 1

ConnectMethod · 0.45

Tested by

no test coverage detected