13 use lib
"$FindBin::Bin/lib/lib/perl5";
16 my @uname = POSIX
::uname
();
17 if($uname[3] =~ m/ubuntu/i) {
18 plan
( skip_all
=> "MySQL on Ubuntu does not work due to AppArmor restrictions" );
23 ##################################################
24 # create our test site
25 my $omd_bin = TestUtils
::get_omd_bin
();
26 my $site = TestUtils
::create_test_site
() or TestUtils
::bail_out_clean
("no further testing without site");
28 ##################################################
31 { cmd
=> $omd_bin." config $site set MYSQL on" },
32 { cmd
=> $omd_bin." config $site show MYSQL", like
=> '/on/', 'unlike' => [ '/error/', '/off/' ] },
33 { cmd
=> $omd_bin." start $site" },
34 { cmd
=> $omd_bin." status $site", like
=> '/mysql:\s*running/' },
35 { cmd
=> "/bin/su - $site -c 'mysql mysql'", stdin
=> "show tables;\n", like
=> [ '/user/', '/tables_priv/' ] },
36 { cmd
=> $omd_bin." stop $site" },
38 for my $test (@
{$tests}) {
39 TestUtils
::test_command
($test);
42 ##################################################
44 TestUtils
::remove_test_site
($site);