-use Test::Simple tests => 6;
+use Test::Simple tests => 8;
use JSON::XS;
my $json = new JSON::XS;
my $LOG = 't/fixtures/light.postgres.log.bz2 t/fixtures/pgbouncer.log.gz';
+my $HLOG = 't/fixtures/logplex.gz';
my $BIN = 'out.bin';
my $OUT = 'out.json';
`rm -f $OUT`;
+$ret = `perl pgbadger -q -o $OUT $HLOG`;
+ok( $? == 0, "Generate json report for heroku log file");
+
+$json_ref = $json->decode(`cat $OUT`);
+
+ok( $json_ref->{database_info}{unknown}{"CTE|duration"} eq "21761.546", "Consistent CTE duration");
+
+`rm -f $OUT`;
+