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

Function skipCockroachDB

pgx_test.go:12–22  ·  view source on GitHub ↗
(t testing.TB, msg string)

Source from the content-addressed store, hash-verified

10)
11
12func skipCockroachDB(t testing.TB, msg string) {
13 conn, err := pgx.Connect(context.Background(), os.Getenv("PGX_TEST_DATABASE"))
14 if err != nil {
15 t.Fatal(err)
16 }
17 defer conn.Close(context.Background())
18
19 if conn.PgConn().ParameterStatus("crdb_version") != "" {
20 t.Skip(msg)
21 }
22}

Calls 4

ParameterStatusMethod · 0.80
PgConnMethod · 0.80
CloseMethod · 0.65
ConnectMethod · 0.45

Tested by

no test coverage detected