summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Villemain2011-11-09 10:57:11 +0000
committerCédric Villemain2011-11-10 02:53:39 +0000
commitd053cb9f2369077a4b9143f5fc457491b11499b0 (patch)
tree2404731ee3ef1d66316b6a60948bdbbc09024a43
parent4577690b837a0c487bc316c7bb1786602ac3ae95 (diff)
Add a test for checkpoint and --assume-standby-mode
-rw-r--r--t/02_checkpoint.t6
1 files changed, 5 insertions, 1 deletions
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);