File tree Expand file tree Collapse file tree 5 files changed +3
-53
lines changed
ebssurrogate/files/unit-tests Expand file tree Collapse file tree 5 files changed +3
-53
lines changed Original file line number Diff line number Diff line change 17
17
cmd : /usr/bin/pg_ctl -D /var/lib/postgresql/data start "-o -c config_file=/etc/postgresql/postgresql.conf"
18
18
when : ebssurrogate_mode
19
19
20
- - name : Enable pgTAP extension
21
- shell : /usr/lib/postgresql/bin/psql -U postgres -h localhost -d postgres -c "CREATE extension pgtap";
22
- when : ebssurrogate_mode
23
-
24
- - name : Create function for testing extensions
25
- shell : /usr/lib/postgresql/bin/psql -U postgres -h localhost -d postgres -f /tmp/unit-tests/test-extensions.sql;
26
- when : ebssurrogate_mode
27
-
28
- - name : Extension Installation tests
29
- shell : /usr/bin/pg_prove -U supabase_admin -h localhost -d postgres -v /tmp/unit-tests/verify-extensions.sql
30
- register : retval
31
- when : ebssurrogate_mode
32
-
33
20
- name : Run Unit tests (with filename unit-test-*) on Postgres Database
34
21
shell : /usr/bin/pg_prove -U postgres -h localhost -d postgres -v /tmp/unit-tests/unit-test-*.sql
35
22
register : retval
51
38
cmd : mv /etc/postgresql/postgresql.conf.bak /etc/postgresql/postgresql.conf
52
39
when : ebssurrogate_mode
53
40
54
- - name : Drop pgTap extension
55
- shell : /usr/lib/postgresql/bin/psql -U postgres -h localhost -d postgres -c "DROP extension if exists pgtap";
56
- when : ebssurrogate_mode
57
-
58
- - name : Drop extension test function
59
- shell : /usr/lib/postgresql/bin/psql -U postgres -h localhost -d postgres -c "DROP FUNCTION IF EXISTS install_available_extensions_and_test";
60
- when : ebssurrogate_mode
61
-
62
41
- name : Reset db stats
63
42
shell : /usr/lib/postgresql/bin/psql --no-password --no-psqlrc -d postgres -h localhost -U supabase_admin -c 'SELECT pg_stat_statements_reset(); SELECT pg_stat_reset();'
64
43
when : ebssurrogate_mode
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
BEGIN ;
2
+ CREATE EXTENSION IF NOT EXISTS pgtap;
2
3
SELECT plan(8 );
3
4
4
5
-- Check installed extensions
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ services:
28
28
depends_on :
29
29
db :
30
30
condition : service_healthy
31
+ dbmate :
32
+ condition : service_completed_successfully
31
33
environment :
32
34
PGHOST : db
33
35
PGUSER : supabase_admin
You can’t perform that action at this time.
0 commit comments