12 use lib
"$FindBin::Bin/lib/lib/perl5";
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 ##################################################
25 { cmd
=> "/bin/su - $site -c 'lib/nagios/plugins/check_jmx4perl'", exit => 3, like
=> '/No Server/' },
26 { cmd
=> "/bin/su - $site -c 'jmx4perl --help'", like
=> '/jmx4perl/' },
27 { cmd
=> "/bin/su - $site -c 'jolokia --help'", like
=> '/jolokia/' },
28 { cmd
=> "/bin/su - $site -c 'j4psh --version'", like
=> '/j4psh/' },
30 for my $test (@
{$tests}) {
31 TestUtils
::test_command
($test);
34 # Test download and management of Jolokia agent
35 #TestUtils::test_command({cmd => "/bin/su - $site -c 'jolokia'", like => '/Saved/'});
36 #TestUtils::test_command({cmd => "/bin/su - $site -c 'jolokia jolokia.war'", like => '/Type.*war/'});
37 #TestUtils::test_command({cmd => "/bin/su - $site -c 'jolokia repack --security jolokia.war'", like => '/Added security/'});
38 #TestUtils::test_command({cmd => "/bin/su - $site -c 'jolokia jolokia.war'", like => '/Authentication\*enabled/'});
40 #`/bin/su - $site -c 'rm jolokia.war'`;
42 ##################################################
44 TestUtils
::remove_test_site
($site);