Skip to content

Commit 1c4e88e

Browse files
committed
Add test coverage for pg_current_logfile() function.
There has been no coverage at all up to now. Given Thomas Kellerer's recent report, I suspect this may fail on (some?) Windows machines, but let's find out. Discussion: https://postgr.es/m/412ae8da-76bb-640f-039a-f3513499e53d@gmx.net
1 parent 654242f commit 1c4e88e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/pg_ctl/t/004_logrotate.pl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use PostgresNode;
55
use TestLib;
6-
use Test::More tests => 4;
6+
use Test::More tests => 5;
77
use Time::HiRes qw(usleep);
88

99
# Set up node with logging collector
@@ -47,6 +47,10 @@
4747

4848
like($first_logfile, qr/division by zero/, 'found expected log file content');
4949

50+
# While we're at it, test pg_current_logfile() function
51+
is($node->safe_psql('postgres', "SELECT pg_current_logfile('stderr')"),
52+
$lfname, 'pg_current_logfile() gives correct answer');
53+
5054
# Sleep 2 seconds and ask for log rotation; this should result in
5155
# output into a different log file name.
5256
sleep(2);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy