pgsql: Convert ddlutils regression tests to TAP tests. - Mailing list pgsql-committers

From Andrew Dunstan
Subject pgsql: Convert ddlutils regression tests to TAP tests.
Date
Msg-id E1wI6vm-003LSh-25@gemulon.postgresql.org
Whole thread
List pgsql-committers
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/5c67dc79-909a-4e17-8606-6686667da6c6@dunslane.net

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(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: Fix nbtree skip array parallel alloc accounting.
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Fix timezone dependence in test_misc/012_ddlutils.pl