File: test99_cleanup.sql

package info (click to toggle)
mimeo 1.5.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,276 kB
  • sloc: sql: 85,916; python: 81; makefile: 27; sh: 17
file content (23 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
\set ON_ERROR_ROLLBACK 1
\set ON_ERROR_STOP true

SELECT set_config('search_path','mimeo, dblink, public',false);
SELECT plan(7);

DROP SCHEMA IF EXISTS mimeo_source CASCADE;
SELECT hasnt_schema('mimeo_source', 'Cleanup schema ''mimeo_source''');
DROP SCHEMA IF EXISTS mimeo_dest CASCADE;
SELECT hasnt_schema('mimeo_dest', 'Cleanup schema ''mimeo_dest''');
DROP DATABASE IF EXISTS mimeo_source;
DELETE FROM mimeo.dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT is_empty('SELECT * FROM dblink_mapping_mimeo WHERE username = ''mimeo_test''', 'Cleanup mimeo_test role from dblink_mapping_mimeo');
DROP ROLE IF EXISTS mimeo_owner;
SELECT hasnt_role('mimeo_owner', 'Drop ''mimeo_owner'' role');
DROP ROLE IF EXISTS mimeo_test;
SELECT hasnt_role('mimeo_test', 'Drop ''mimeo_test'' role');
DROP ROLE IF EXISTS mimeo_dumb_role;
SELECT hasnt_role('mimeo_dumb_role', 'Drop ''mimeo_dumb_role'' role');
DROP ROLE IF EXISTS "mimeo-dumber-role";
SELECT hasnt_role('mimeo-dumber-role', 'Drop ''mimeo-dumb-role'' role');

SELECT * FROM finish();