Skip tests with unsupported types on CockroachDB
This commit is contained in:
@@ -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
|
||||||
}{
|
}{
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
Reference in New Issue
Block a user