Refactor more the regression tests of pg_stat_statements
authorMichael Paquier <michael@paquier.xyz>
Thu, 2 Mar 2023 23:46:11 +0000 (08:46 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 2 Mar 2023 23:46:11 +0000 (08:46 +0900)
commitd0028e35a05ac71aebf28325c8ddb59a27cb63c0
tree4397df3830406a1f7a0a38c499aadf681a69b09d
parent98a88bc2bcd60e41ca70e2f1e13eee827e23eefb
Refactor more the regression tests of pg_stat_statements

This commit expands more the refactoring of the regression tests of
pg_stat_statements, with tests moved out of pg_stat_statements.sql into
separate files.  The following file structure is now used:
- select is mostly the former pg_stat_statements.sql, renamed.
- dml for INSERT/UPDATE/DELETE and MERGE
- user_activity, to test role-level checks and stat resets.
- wal, to check the WAL generation after some queries.

Like e8dbdb1, there is no change in terms of code coverage or results,
and this finishes the split I was aiming for in these tests.  Most of
the tests used "test" of "pgss_test" as names for the tables used, these
are renamed to less generic names.

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Y/7Y9U/y/keAW3qH@paquier.xyz
12 files changed:
contrib/pg_stat_statements/Makefile
contrib/pg_stat_statements/expected/dml.out [new file with mode: 0644]
contrib/pg_stat_statements/expected/pg_stat_statements.out [deleted file]
contrib/pg_stat_statements/expected/select.out [new file with mode: 0644]
contrib/pg_stat_statements/expected/user_activity.out [new file with mode: 0644]
contrib/pg_stat_statements/expected/wal.out [new file with mode: 0644]
contrib/pg_stat_statements/meson.build
contrib/pg_stat_statements/sql/dml.sql [new file with mode: 0644]
contrib/pg_stat_statements/sql/pg_stat_statements.sql [deleted file]
contrib/pg_stat_statements/sql/select.sql [new file with mode: 0644]
contrib/pg_stat_statements/sql/user_activity.sql [new file with mode: 0644]
contrib/pg_stat_statements/sql/wal.sql [new file with mode: 0644]