summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-01-03 17:30:31 +0000
committerGreg Sabino Mullane2011-01-03 17:30:31 +0000
commitc2cb17268061da9d48f600b21545f4ff285849c4 (patch)
treea8c35bbf64cb615215c1101f79fcbdf0e0562859
parent438d40f6da17c4517def0e73a65c34c9d76f9cf8 (diff)
Minor test tweaks.
-rw-r--r--t/02_backends.t9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/02_backends.t b/t/02_backends.t
index 5321b26ae..3173d4c94 100644
--- a/t/02_backends.t
+++ b/t/02_backends.t
@@ -45,10 +45,10 @@ SKIP: {
$goodver or skip 'Cannot test backends completely with older versions of Postgres', 3;
- like ($result, qr{^$label OK: \(host:$host\) 2 of 10 connections}, $t);
+ like ($result, qr{^$label OK: \(host:$host\).* 2 of 10 connections}, $t);
$t=qq{$S returned correct percentage};
- like ($result, qr{^$label OK: \(host:$host\) 2 of 10 connections \(20%\)}, $t);
+ like ($result, qr{^$label OK: \(host:$host\).* 2 of 10 connections \(20%\)}, $t);
$t=qq{$S returned correct performance data};
like ($result, qr{ \| time=(\d\.\d\d) 'ardala'=0;9;9;0;10 'beedeebeedee'=0;9;9;0;10 'postgres'=2;9;9;0;10 'template0'=0;9;9;0;10 'template1'=0;9;9;0;10\s$}, $t);
@@ -107,10 +107,9 @@ like ($cp->run("-w ${num}0%"), qr{^$label WARNING}, $t);
like ($cp->run('-w 40%'), qr{^$label OK}, $t);
$t=qq{$S works with warning option as a negative number};
-like ($cp->run('-w -6'), qr{^$label WARNING}, $t);
like ($cp->run('-w -7'), qr{^$label WARNING}, $t);
-$num = $goodver ? 8 : 9;
-like ($cp->run("-w -$num"), qr{^$label OK}, $t);
+like ($cp->run('-w -8'), qr{^$label WARNING}, $t);
+like ($cp->run('-w -1'), qr{^$label OK}, $t);
$t=qq{$S works with critical option as an absolute number};
like ($cp->run('-c 2'), qr{^$label CRITICAL}, $t);