Add regression tests for csvlog with the logging collector

Michael Paquier <michael@paquier.xyz>

Commit: 72b76f76161c78dd1be42592c4e5b980beef5f26
Author: Michael Paquier <michael@paquier.xyz>
Date: 2021-09-13T01:23:59Z
Releases: 15.0
Add regression tests for csvlog with the logging collector

These are added in the existing tests of pg_ctl for log rotation, that
already tested stderr.  The same amount of coverage is added for csvlog:
- Checks for pg_current_logfile().
- Log rotation with expected file name.
- Log contents generated.

This test is refactored to minimize the amount of work required to add
tests for new log formats, easing some upcoming work.

Author: Michael Paquier, Sehrope Sarkuni
Discussion: https://postgr.es/m/CAH7T-aqswBM6JWe4pDehi1uOiufqe06DJWaU5=X7dDLyqUExHg@mail.gmail.com

Files

PathChange+/−
src/bin/pg_ctl/t/004_logrotate.pl modified +58 −37

Discussion