Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / t / 30-check_webinject.t
bloba0e4d24584f6f88708ccb279388aea4326c39676
1 #!/usr/bin/env perl
3 use warnings;
4 use strict;
5 use Test::More;
7 BEGIN {
8 use lib('t');
9 require TestUtils;
10 import TestUtils;
11 use FindBin;
12 use lib "$FindBin::Bin/lib/lib/perl5";
15 plan( tests => 10 );
17 ##################################################
18 # create our test site
19 my $omd_bin = TestUtils::get_omd_bin();
20 my $site = TestUtils::create_test_site() or TestUtils::bail_out_clean("no further testing without site");
22 ##################################################
23 # execute some checks
24 my $tests = [
25 { cmd => "/bin/su - $site -c 'lib/nagios/plugins/check_webinject'", exit => 3, like => '/find any test case files to run./' },
27 for my $test (@{$tests}) {
28 TestUtils::test_command($test);
31 ##################################################
32 # cleanup test site
33 TestUtils::remove_test_site($site);