summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2009-07-21 00:41:49 +0000
committerGreg Sabino Mullane2009-07-21 00:41:49 +0000
commitbbab366aa667c660598bc3b80c9281ae2ccb013a (patch)
tree6f66469d12ff4d5e4301cf9e213f596a3fa8be51
parentefd24063d3dcc7c60955e35055a2c3490744fdca (diff)
Allow skipping of tests if Date::Parse not installed.
-rw-r--r--t/02_checkpoint.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/02_checkpoint.t b/t/02_checkpoint.t
index de342ba69..1ee870a59 100644
--- a/t/02_checkpoint.t
+++ b/t/02_checkpoint.t
@@ -47,6 +47,15 @@ my $dbh = $cp->get_dbh();
$dbh->do('CHECKPOINT');
$dbh->commit();
$host =~ s/socket$//;
+my $result = $cp->run(qq{-w 20 --datadir="$host"});
+
+SKIP:
+{
+
+if ($result =~ /Date::Parse/) {
+ skip 'Cannot test checkpoint action unless Date::Parse module is installed', 6;
+}
+
like ($cp->run(qq{-w 20 --datadir="$host"}), qr{^$label OK}, $t);
$t=qq{$S returns a warning when checkpoint older than warning option};
@@ -65,4 +74,6 @@ like ($cp->run(qq{-c 1 --output=MRTG --datadir="$host"}), qr{^\d\n0\n\nLast chec
$t=qq{$S returns the expected output for MRTG};
like ($cp->run(qq{-c 199 --output=MRTG --datadir="$host"}), qr{^\d\n0\n\nLast checkpoint was \d seconds ago}, $t);
+}
+
exit;