Skip to content

Commit

Permalink
fix(test): skip CockroachDB since it doesn't support XML
Browse files Browse the repository at this point in the history
  • Loading branch information
nickcruess-soda committed Jul 12, 2024
1 parent 37681a4 commit a8aaa37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pgtype/xml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type xmlStruct struct {
}

func TestXMLCodec(t *testing.T) {
skipCockroachDB(t, "CockroachDB does not support XML.")
pgxtest.RunValueRoundTripTests(context.Background(), t, defaultConnTestRunner, nil, "xml", []pgxtest.ValueRoundTripTest{
{nil, new(*xmlStruct), isExpectedEq((*xmlStruct)(nil))},
{map[string]any(nil), new(*string), isExpectedEq((*string)(nil))},
Expand Down Expand Up @@ -48,6 +49,7 @@ func TestXMLCodec(t *testing.T) {

// https://github.com/jackc/pgx/issues/1273#issuecomment-1221414648
func TestXMLCodecUnmarshalSQLNull(t *testing.T) {
skipCockroachDB(t, "CockroachDB does not support XML.")
defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
// Byte arrays are nilified
slice := []byte{10, 4}
Expand Down Expand Up @@ -82,6 +84,7 @@ func TestXMLCodecUnmarshalSQLNull(t *testing.T) {
}

func TestXMLCodecPointerToPointerToString(t *testing.T) {
skipCockroachDB(t, "CockroachDB does not support XML.")
defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
var s *string
err := conn.QueryRow(ctx, "select ''::xml").Scan(&s)
Expand Down

0 comments on commit a8aaa37

Please sign in to comment.