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:
parent
6dfbfffe59
commit
a5509c7415
@ -17,7 +17,7 @@ INTVERSION := $(shell echo $$(($$(echo $(VERSION).0 | sed 's/\([[:digit:]]\{1,\}
|
||||
# Test suite
|
||||
#
|
||||
|
||||
REGRESS := init-extension repack after-schema tablespace issue3
|
||||
REGRESS := init-extension repack after-schema nosuper tablespace issue3
|
||||
|
||||
USE_PGXS = 1 # use pgxs if not in contrib directory
|
||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||
|
19
regress/expected/nosuper.out
Normal file
19
regress/expected/nosuper.out
Normal file
@ -0,0 +1,19 @@
|
||||
--
|
||||
-- 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
|
||||
LINE 1: select repack.version(), repack.version_sql()
|
||||
^
|
||||
DROP ROLE IF EXISTS nosuper;
|
17
regress/expected/nosuper_1.out
Normal file
17
regress/expected/nosuper_1.out
Normal 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;
|
@ -433,23 +433,6 @@ ERROR: cannot repack specific schema(s) in all databases
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
|
||||
INFO: repacking table "tbl_cluster"
|
||||
--
|
||||
-- no superuser check
|
||||
--
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
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
|
||||
LINE 1: select repack.version(), repack.version_sql()
|
||||
^
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
--
|
||||
-- exclude extension check
|
||||
--
|
||||
CREATE SCHEMA exclude_extension_schema;
|
||||
|
@ -433,21 +433,6 @@ ERROR: cannot repack specific schema(s) in all databases
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
|
||||
INFO: repacking table "tbl_cluster"
|
||||
--
|
||||
-- no superuser check
|
||||
--
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
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;
|
||||
--
|
||||
-- exclude extension check
|
||||
--
|
||||
CREATE SCHEMA exclude_extension_schema;
|
||||
|
@ -433,23 +433,6 @@ ERROR: cannot repack specific schema(s) in all databases
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
|
||||
INFO: repacking table "tbl_cluster"
|
||||
--
|
||||
-- no superuser check
|
||||
--
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
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
|
||||
LINE 1: select repack.version(), repack.version_sql()
|
||||
^
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
--
|
||||
-- exclude extension check
|
||||
--
|
||||
CREATE SCHEMA exclude_extension_schema;
|
||||
|
@ -433,21 +433,6 @@ ERROR: cannot repack specific schema(s) in all databases
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
|
||||
INFO: repacking table "tbl_cluster"
|
||||
--
|
||||
-- no superuser check
|
||||
--
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
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;
|
||||
--
|
||||
-- exclude extension check
|
||||
--
|
||||
CREATE SCHEMA exclude_extension_schema;
|
||||
|
14
regress/sql/nosuper.sql
Normal file
14
regress/sql/nosuper.sql
Normal file
@ -0,0 +1,14 @@
|
||||
--
|
||||
-- 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
|
||||
-- => ERROR
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper
|
||||
-- => ERROR
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper --no-superuser-check
|
||||
DROP ROLE IF EXISTS nosuper;
|
@ -291,19 +291,6 @@ CREATE TABLE test_schema2.tbl2 (id INTEGER PRIMARY KEY);
|
||||
--
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
|
||||
|
||||
--
|
||||
-- no superuser check
|
||||
--
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
CREATE ROLE nosuper WITH LOGIN;
|
||||
-- => OK
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check
|
||||
-- => ERROR
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper
|
||||
-- => ERROR
|
||||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper --no-superuser-check
|
||||
DROP ROLE IF EXISTS nosuper;
|
||||
|
||||
--
|
||||
-- exclude extension check
|
||||
--
|
||||
|
Loading…
x
Reference in New Issue
Block a user