Add a test for checkpoint and --assume-standby-mode
authorCédric Villemain <[email protected]>
Wed, 9 Nov 2011 10:57:11 +0000 (11:57 +0100)
committerCédric Villemain <[email protected]>
Thu, 10 Nov 2011 02:53:39 +0000 (03:53 +0100)
t/02_checkpoint.t

index 724e695b896f47d274413140573381191cdc3703..dabee60dc532a1ef20cd48e15f98d62ae73a4c9d 100644 (file)
@@ -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);