2
0

Extract SkipCockroachDB to pgxtest

This commit is contained in:
Jack Christensen
2022-04-02 10:35:13 -05:00
parent e18d76b798
commit 83e50f21e8
9 changed files with 34 additions and 30 deletions
+7
View File
@@ -86,3 +86,10 @@ func RunWithQueryExecModes(ctx context.Context, t *testing.T, ctr ConnTestRunner
)
}
}
// SkipCockroachDB calls Skip on t with msg if the connection is to a CockroachDB server.
func SkipCockroachDB(t testing.TB, conn *pgx.Conn, msg string) {
if conn.PgConn().ParameterStatus("crdb_version") != "" {
t.Skip(msg)
}
}