perl-modules: increase timeouts for arm-build
[omd.git] / t / 20-package_dokuwiki.t
blobdb780f6f436e1b4ffcb47b76dfaca1a333de5471
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 => 32 );
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 => $omd_bin." start $site" },
27 { cmd => "/bin/su - $site -c 'lib/nagios/plugins/check_http -H localhost -u /$site/wiki -e 401'", like => '/HTTP OK:/' },
28 { cmd => "/bin/su - $site -c 'lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/wiki -e 301'", like => '/HTTP OK:/' },
29 { cmd => "/bin/su - $site -c 'lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/wiki/ -e 302'", like => '/HTTP OK:/' },
30 { cmd => "/bin/su - $site -c 'lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/wiki/doku.php -e 200'", like => '/HTTP OK:/' },
31 { cmd => "/bin/su - $site -c 'test -h var/dokuwiki/lib/plugins/acl'", like => '//' },
33 { cmd => $omd_bin." stop $site" },
35 for my $test (@{$tests}) {
36 TestUtils::test_command($test);
39 ##################################################
40 # cleanup test site
41 TestUtils::remove_test_site($site);