diff options
author | Peter Bray <illumino@users.sourceforge.net> | 2005-07-25 01:47:15 +0000 |
---|---|---|
committer | Peter Bray <illumino@users.sourceforge.net> | 2005-07-25 01:47:15 +0000 |
commit | cdc06cc3e2c4670d3cd46b0a03adcf7e6958eff1 (patch) | |
tree | 62b074eaca618762fb03f94708ec3def50037697 /plugins-scripts/t/check_rpc.t | |
parent | 05853f47eb6e608de993cc59343c73b96b9b33e2 (diff) | |
download | monitoring-plugins-cdc06cc3e2c4670d3cd46b0a03adcf7e6958eff1.tar.gz |
[1185704] New Testing Infrastructure.
Complete rewrite of the original testing infrastructure and
all test cases (to use the new infrastructure)
See NPTest.pm and issue 1185704 for more details.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1207 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins-scripts/t/check_rpc.t')
-rw-r--r-- | plugins-scripts/t/check_rpc.t | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/plugins-scripts/t/check_rpc.t b/plugins-scripts/t/check_rpc.t index afcb867c..9fff0ee9 100644 --- a/plugins-scripts/t/check_rpc.t +++ b/plugins-scripts/t/check_rpc.t | |||
@@ -1,19 +1,22 @@ | |||
1 | #! /usr/bin/perl -w -I .. | ||
2 | # | ||
3 | # Remote Procedure Call (RPC) Tests via check_rpc | ||
4 | # | ||
5 | # $Id$ | ||
6 | # | ||
7 | |||
1 | use strict; | 8 | use strict; |
2 | use Test; | 9 | use Test; |
3 | use vars qw($tests); | 10 | use NPTest; |
4 | 11 | ||
12 | use vars qw($tests); | ||
5 | BEGIN {$tests = 2; plan tests => $tests} | 13 | BEGIN {$tests = 2; plan tests => $tests} |
6 | 14 | ||
7 | my $null = ''; | 15 | my $successOutput = '/^check_rpc/'; |
8 | my $cmd; | 16 | |
9 | my $str; | 17 | my $t; |
10 | my $t=0; | ||
11 | 18 | ||
12 | $cmd = "./check_rpc -V"; | 19 | $t += checkCmd( "./check_rpc -V", 0, $successOutput ); |
13 | $str = `$cmd`; | ||
14 | $t += ok $?>>8,0; | ||
15 | print "Test was: $cmd\n" if ($?); | ||
16 | $t += ok $str, '/^check_rpc/'; | ||
17 | 20 | ||
18 | exit(0) if defined($Test::Harness::VERSION); | 21 | exit(0) if defined($Test::Harness::VERSION); |
19 | exit($tests - $t); | 22 | exit($tests - $t); |