mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 22:16:20 +00:00
PG-292: Automate the Q/A and implement tap testcases.
This commit brings following changes: 1) Implementation of tap based testing using perl language for different scenarios that could not be covered under traditional SQL based diff testing, or require server start/shutdown. At this point of time, tap testing is only enabled for Postgres 14 & 13, for rest of back branches it will be done at laster time as there is substantial change in number of columns and their names. 2) Changes to github action workflows for Postgres 14 & 13 to accomodate the requirements for tap testing. 3) Similarly, minor changes to Makefile are also done. 4) Testing of supported GUCs using tap tests for different possible configuration. 5) pg_stat_monitor_reset_errors testing using the tap testcases. 6) Insufficient shared space and buffer overflow testing via tap testcases. 7) Some sql scripts under 'scripts' folder to generate some work load requried for tap test cases. 8) Everything under 't' folder is specific to perl based test cases. It houses perl files and folders for some expected files and result folder. 9) 90%+ code coverage for LOC and functions. 10) PG-339 Fix by diego, change in pgsm_errors.c.
This commit is contained in:
45
regression/expected/error_2.out
Normal file
45
regression/expected/error_2.out
Normal file
@@ -0,0 +1,45 @@
|
||||
CREATE EXTENSION pg_stat_monitor;
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT 1/0; -- divide by zero
|
||||
ERROR: division by zero
|
||||
SELECT * FROM unknown; -- unknown table
|
||||
ERROR: relation "unknown" does not exist
|
||||
LINE 1: SELECT * FROM unknown;
|
||||
^
|
||||
ELECET * FROM unknown; -- syntax error
|
||||
ERROR: syntax error at or near "ELECET"
|
||||
LINE 1: ELECET * FROM unknown;
|
||||
^
|
||||
do $$
|
||||
BEGIN
|
||||
RAISE WARNING 'warning message';
|
||||
END $$;
|
||||
WARNING: warning message
|
||||
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel;
|
||||
query | elevel | sqlcode | message
|
||||
----------------------------------+--------+---------+-----------------------------------
|
||||
ELECET * FROM unknown; | 20 | 42601 | syntax error at or near "ELECET"
|
||||
SELECT * FROM unknown; | 20 | 42P01 | relation "unknown" does not exist
|
||||
SELECT pg_stat_monitor_reset() | 0 | |
|
||||
do $$ +| 0 | |
|
||||
BEGIN +| | |
|
||||
RAISE WARNING 'warning message';+| | |
|
||||
END $$ | | |
|
||||
do $$ +| 19 | 01000 | warning message
|
||||
BEGIN +| | |
|
||||
RAISE WARNING 'warning message';+| | |
|
||||
END $$; | | |
|
||||
(5 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
DROP EXTENSION pg_stat_monitor;
|
||||
Reference in New Issue
Block a user