Skip to content

Commit

Permalink
Merge pull request #2028 from jackc/enable-composite-tests-on-cockroa…
Browse files Browse the repository at this point in the history
…chdb

Enable composite tests on cockroachdb
  • Loading branch information
jackc authored Jan 25, 2025
2 parents 2d21a2b + a26c935 commit b5efc90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ci/setup_test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ fi

if [[ "${PGVERSION-}" =~ ^cockroach ]]
then
wget -qO- https://binaries.cockroachdb.com/cockroach-v23.1.3.linux-amd64.tgz | tar xvz
sudo mv cockroach-v23.1.3.linux-amd64/cockroach /usr/local/bin/
wget -qO- https://binaries.cockroachdb.com/cockroach-v24.3.3.linux-amd64.tgz | tar xvz
sudo mv cockroach-v24.3.3.linux-amd64/cockroach /usr/local/bin/
cockroach start-single-node --insecure --background --listen-addr=localhost
cockroach sql --insecure -e 'create database pgx_test'
fi
Expand Down
10 changes: 1 addition & 9 deletions pgtype/composite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
)

func TestCompositeCodecTranscode(t *testing.T) {
skipCockroachDB(t, "Server does not support composite types (see https://github.com/cockroachdb/cockroach/issues/27792)")

defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {

_, err := conn.Exec(ctx, `drop type if exists ct_test;
Expand Down Expand Up @@ -91,8 +89,6 @@ func (p *point3d) ScanIndex(i int) any {
}

func TestCompositeCodecTranscodeStruct(t *testing.T) {
skipCockroachDB(t, "Server does not support composite types (see https://github.com/cockroachdb/cockroach/issues/27792)")

defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {

_, err := conn.Exec(ctx, `drop type if exists point3d;
Expand Down Expand Up @@ -128,8 +124,6 @@ create type point3d as (
}

func TestCompositeCodecTranscodeStructWrapper(t *testing.T) {
skipCockroachDB(t, "Server does not support composite types (see https://github.com/cockroachdb/cockroach/issues/27792)")

defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {

_, err := conn.Exec(ctx, `drop type if exists point3d;
Expand Down Expand Up @@ -169,8 +163,6 @@ create type point3d as (
}

func TestCompositeCodecDecodeValue(t *testing.T) {
skipCockroachDB(t, "Server does not support composite types (see https://github.com/cockroachdb/cockroach/issues/27792)")

defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {

_, err := conn.Exec(ctx, `drop type if exists point3d;
Expand Down Expand Up @@ -214,7 +206,7 @@ create type point3d as (
//
// https://github.com/jackc/pgx/issues/1576
func TestCompositeCodecTranscodeStructWrapperForTable(t *testing.T) {
skipCockroachDB(t, "Server does not support composite types (see https://github.com/cockroachdb/cockroach/issues/27792)")
skipCockroachDB(t, "Server does not support composite types from table definitions")

defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {

Expand Down

0 comments on commit b5efc90

Please sign in to comment.