Convert ddlutils regression tests to TAP tests.

The regression tests for pg_get_role_ddl(), pg_get_database_ddl(),
and pg_get_tablespace_ddl() created databases and tablespaces, which
are heavyweight operations.  As noted by Andres Freund, this is
wasteful in the core regression suite which gets run repeatedly.

Convert the three test files (role_ddl.sql, database_ddl.sql,
tablespace_ddl.sql) into a single TAP test that runs once, covering
all the same functionality: basic DDL generation, pretty-printing,
option handling, error cases, permission checks, and edge cases like
quoted names and role memberships.

Discussion: 
https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c529ee38b9eb26527da05b85dee087676dd8fe37

Modified Files
--------------
src/test/modules/test_misc/meson.build       |   1 +
src/test/modules/test_misc/t/012_ddlutils.pl | 286 +++++++++++++++++++++++++++
src/test/regress/expected/database_ddl.out   |  88 ---------
src/test/regress/expected/role_ddl.out       | 143 --------------
src/test/regress/expected/tablespace_ddl.out |  84 --------
src/test/regress/parallel_schedule           |   1 -
src/test/regress/sql/database_ddl.sql        |  66 -------
src/test/regress/sql/role_ddl.sql            |  96 ---------
src/test/regress/sql/tablespace_ddl.sql      |  58 ------
9 files changed, 287 insertions(+), 536 deletions(-)

Reply via email to