From: Gilles Darold Date: Wed, 12 Sep 2018 18:55:07 +0000 (+0200) Subject: Add test on pgbouncer log parser. X-Git-Tag: v10.1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32e0ccf8bbb775f865da3723988bdeb452f17ab0;p=pgbadger Add test on pgbouncer log parser. --- diff --git a/t/03_consistency.t b/t/03_consistency.t index 2cffc77..04458e8 100755 --- a/t/03_consistency.t +++ b/t/03_consistency.t @@ -1,9 +1,9 @@ -use Test::Simple tests => 5; +use Test::Simple tests => 6; use JSON::XS; my $json = new JSON::XS; -my $LOG = 't/fixtures/light.postgres.log.bz2'; +my $LOG = 't/fixtures/light.postgres.log.bz2 t/fixtures/pgbouncer.log.gz'; my $BIN = 'out.bin'; my $OUT = 'out.json'; @@ -26,5 +26,7 @@ ok( $json_ref->{overall_stat}{histogram}{query_total} == 629, "Consistent query_ ok( $json_ref->{overall_stat}{peak}{"2017-09-06 08:48:45"}{write} == 1, "Consistent peak write"); +ok( $json_ref->{pgb_session_info}{chronos}{20180912}{16}{count} == 63943, "pgBouncer connections"); + `rm -f $OUT`; diff --git a/t/fixtures/pgbouncer.log.gz b/t/fixtures/pgbouncer.log.gz new file mode 100644 index 0000000..20a1b10 Binary files /dev/null and b/t/fixtures/pgbouncer.log.gz differ