2
0

Skip tests with unsupported types on CockroachDB

This commit is contained in:
Jack Christensen
2022-04-23 10:34:53 -05:00
parent 791176f4fe
commit 468b793282
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -6,6 +6,7 @@ import (
pgx "github.com/jackc/pgx/v5" pgx "github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype" "github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgxtest"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
@@ -70,7 +71,12 @@ func TestArrayCodecFlatArray(t *testing.T) {
} }
func TestArrayCodecArray(t *testing.T) { func TestArrayCodecArray(t *testing.T) {
defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) { ctr := defaultConnTestRunner
ctr.AfterConnect = func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
pgxtest.SkipCockroachDB(t, conn, "Server does not support multi-dimensional arrays")
}
ctr.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
for i, tt := range []struct { for i, tt := range []struct {
expected any expected any
}{ }{
+2
View File
@@ -398,6 +398,8 @@ func TestConnQueryScanArray(t *testing.T) {
func TestConnQueryScanRange(t *testing.T) { func TestConnQueryScanRange(t *testing.T) {
testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) { testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {
skipCockroachDB(t, db, "Server does not support int4range")
m := pgtype.NewMap() m := pgtype.NewMap()
var r pgtype.Range[pgtype.Int4] var r pgtype.Range[pgtype.Int4]