Skip to content

Commit 4c9e983

Browse files
committed
chore: rollback extensions from pgtap tests
1 parent bdb2ece commit 4c9e983

29 files changed

+60
-3
lines changed

migrations/docker-compose.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: "3.8"
66

77
services:
88
db:
9-
image: supabase/postgres:15.1.0.11
9+
image: supabase/postgres:15.1.0.42
1010
restart: "no"
1111
ports:
1212
- 5478:5432
@@ -30,7 +30,8 @@ services:
3030
condition: service_healthy
3131
environment:
3232
PGHOST: db
33-
PGUSER: postgres
33+
PGUSER: supabase_admin
34+
PGDATABASE: postgres
3435
PGPASSWORD: ${POSTGRES_PASSWORD}
3536
volumes:
3637
- ./tests:/tests
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists postgis_sfcgal with schema "extensions" cascade;
3+
ROLLBACK;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
create extension if not exists pgrouting with schema "extensions";
1+
BEGIN;
2+
create extension if not exists pgrouting with schema "extensions" cascade;
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pgtap with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pg_cron with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pgaudit with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pgjwt with schema "extensions" cascade;
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists http with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists plpgsql_check with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
alter role postgres set session_preload_libraries = 'safeupdate';
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists timescaledb with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
BEGIN;
12
select pg_drop_replication_slot(slot_name) from pg_replication_slots where slot_name = 'test_slot';
23
select * from pg_create_logical_replication_slot('test_slot', 'wal2json');
4+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pljava with schema "sqlj";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists plv8 with schema "pg_catalog";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
alter role postgres set session_preload_libraries = 'plan_filter';
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pg_net with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists rum with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pg_hashids with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
BEGIN;
12
create schema if not exists "pgsodium";
23
create extension if not exists pgsodium with schema "pgsodium";
4+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
BEGIN;
12
create schema if not exists "graphql";
23
create extension if not exists pg_graphql with schema "graphql";
4+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pg_stat_monitor with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pg_jsonschema with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
BEGIN;
12
create schema if not exists "vault";
23
create extension if not exists supabase_vault with schema "vault" cascade;
4+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pgroonga with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists wrappers with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists hypopg with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists pg_repack with schema "extensions";
3+
ROLLBACK;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
BEGIN;
12
create extension if not exists vector with schema "extensions";
3+
ROLLBACK;

migrations/tests/test.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
-- Create all extensions
22
\ir extensions/test.sql
33

4+
CREATE EXTENSION IF NOT EXISTS pgtap;
5+
46
BEGIN;
57

68
SELECT plan(19);

0 commit comments

Comments
 (0)