Skip to content

Commit 31f9856

Browse files
committed
Clear roles on test bootstrap
1 parent ded413f commit 31f9856

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/bootstrap.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import { spawnSync } from 'child_process'
22

3+
exec('dropdb', ['postgres_js_test'])
4+
35
exec('psql', ['-c', 'alter system set ssl=on'])
6+
exec('psql', ['-c', 'drop user postgres_js_test'])
47
exec('psql', ['-c', 'create user postgres_js_test'])
58
exec('psql', ['-c', 'alter system set password_encryption=md5'])
69
exec('psql', ['-c', 'select pg_reload_conf()'])
10+
exec('psql', ['-c', 'drop user if exists postgres_js_test_md5'])
711
exec('psql', ['-c', 'create user postgres_js_test_md5 with password \'postgres_js_test_md5\''])
812
exec('psql', ['-c', 'alter system set password_encryption=\'scram-sha-256\''])
913
exec('psql', ['-c', 'select pg_reload_conf()'])
14+
exec('psql', ['-c', 'drop user if exists postgres_js_test_scram'])
1015
exec('psql', ['-c', 'create user postgres_js_test_scram with password \'postgres_js_test_scram\''])
1116

12-
exec('dropdb', ['postgres_js_test'])
1317
exec('createdb', ['postgres_js_test'])
1418
exec('psql', ['-c', 'grant all on database postgres_js_test to postgres_js_test'])
1519
exec('psql', ['-c', 'alter database postgres_js_test owner to postgres_js_test'])

0 commit comments

Comments
 (0)