No superuser check separated from other tests

The output differs across versions because it can include the context.

This made:

- repack.out = repack_1.out
- repack_3.out = repack_5.out
This commit is contained in:
Daniele Varrazzo
2018-03-20 12:28:16 +00:00
parent 6dfbfffe59
commit a5509c7415
9 changed files with 51 additions and 78 deletions

View File

@ -0,0 +1,17 @@
--
-- no superuser check
--
SET client_min_messages = error;
DROP ROLE IF EXISTS nosuper;
SET client_min_messages = warning;
CREATE ROLE nosuper WITH LOGIN;
-- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check
INFO: repacking table "tbl_cluster"
-- => ERROR
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper
ERROR: pg_repack failed with error: You must be a superuser to use pg_repack
-- => ERROR
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper --no-superuser-check
ERROR: pg_repack failed with error: ERROR: permission denied for schema repack
DROP ROLE IF EXISTS nosuper;