From: Cédric Villemain Date: Wed, 9 Nov 2011 10:57:11 +0000 (+0100) Subject: Add a test for checkpoint and --assume-standby-mode X-Git-Tag: 2.19.0~24^2~2 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d053cb9f2369077a4b9143f5fc457491b11499b0;p=check_postgres.git Add a test for checkpoint and --assume-standby-mode --- diff --git a/t/02_checkpoint.t b/t/02_checkpoint.t index 724e695b8..dabee60dc 100644 --- a/t/02_checkpoint.t +++ b/t/02_checkpoint.t @@ -6,7 +6,7 @@ use 5.006; use strict; use warnings; use Data::Dumper; -use Test::More tests => 13; +use Test::More tests => 14; use lib 't','.'; use CP_Testing; @@ -65,6 +65,10 @@ like ($cp->run(qq{-w 1 --datadir="$host"}), qr{^$label WARNING:}, $t); $t=qq{$S returns a critical when checkpoint older than critical option}; like ($cp->run(qq{-c 1 --datadir="$host"}), qr{^$label CRITICAL:}, $t); +# FIXME: no check for --assume-prod, it needs to have a cluster in this state +$t=qq{$S returns a critical when --assume-standby-mode on a non-standby}; +like ($cp->run(qq{-c 1000 --datadir="$host" --assume-standby-mode}), qr{^$label CRITICAL:.*mode=NOT STANDBY}, $t); + $t=qq{$S returns the correct number of seconds}; like ($cp->run(qq{-c 1 --datadir="$host"}), qr{was \d+ seconds ago}, $t);