Simplify CockroachDB detection
This commit is contained in:
+4
-12
@@ -18,9 +18,7 @@ func TestConnSendBatch(t *testing.T) {
|
||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||
defer closeConn(t, conn)
|
||||
|
||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||
t.Skip("Server serial type is incompatible with test")
|
||||
}
|
||||
skipCockroachDB(t, conn, "Server serial type is incompatible with test")
|
||||
|
||||
sql := `create temporary table ledger(
|
||||
id serial primary key,
|
||||
@@ -189,9 +187,7 @@ func TestConnSendBatchWithPreparedStatement(t *testing.T) {
|
||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||
defer closeConn(t, conn)
|
||||
|
||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||
t.Skip("Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
|
||||
}
|
||||
skipCockroachDB(t, conn, "Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
|
||||
|
||||
_, err := conn.Prepare(context.Background(), "ps1", "select n from generate_series(0,$1::int) n")
|
||||
if err != nil {
|
||||
@@ -248,9 +244,7 @@ func TestConnSendBatchWithPreparedStatementAndStatementCacheDisabled(t *testing.
|
||||
conn := mustConnect(t, config)
|
||||
defer closeConn(t, conn)
|
||||
|
||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||
t.Skip("Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
|
||||
}
|
||||
skipCockroachDB(t, conn, "Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
|
||||
|
||||
_, err = conn.Prepare(context.Background(), "ps1", "select n from generate_series(0,$1::int) n")
|
||||
if err != nil {
|
||||
@@ -605,9 +599,7 @@ func TestConnBeginBatchDeferredError(t *testing.T) {
|
||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||
defer closeConn(t, conn)
|
||||
|
||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||
t.Skip("Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
|
||||
}
|
||||
skipCockroachDB(t, conn, "Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
|
||||
|
||||
mustExec(t, conn, `create temporary table t (
|
||||
id text primary key,
|
||||
|
||||
Reference in New Issue
Block a user