[omd-commits] OMD Git: omd: mod_gearman: fixed tests for icinga

git version control git at mathias-kettner.de
Thu Sep 13 13:49:18 CEST 2012


Module:   omd
Branch:   master
Commit:   9ee4adc9b4dc09babae2646cd5fb184ca1a4207b
URL:      http://omdistro.org/projects/omd/repository/revisions/9ee4adc9b4dc09babae2646cd5fb184ca1a4207b

Author:   Joerg Linge <pitchfork at pnp4nagios.org>
Date:     Thu Sep 13 13:48:51 2012 +0200
Commiter: Joerg Linge <pitchfork at pnp4nagios.org>
Date:     Thu Sep 13 13:48:51 2012 +0200

mod_gearman: fixed tests for icinga

---

 t/31-mod-gearman.t |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/31-mod-gearman.t b/t/31-mod-gearman.t
index 68cfec3..5973163 100644
--- a/t/31-mod-gearman.t
+++ b/t/31-mod-gearman.t
@@ -60,8 +60,8 @@ for my $core (qw/nagios icinga/) {
       { cmd => "/usr/bin/test -s /omd/sites/$site/etc/mod-gearman/secret.key", "exit" => 0 },
       { cmd => $omd_bin." start $site", like => [ '/gearmand\.\.\.OK/', '/gearman_worker\.\.\.OK/'], sleep => 1 },
       { cmd => $omd_bin." status $site", like => [ '/gearmand:\s+running/', '/gearman_worker:\s*running/'] },
-      { cmd => "/bin/su - $site -c './lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/$core/cgi-bin/cmd.cgi -e 200 -P \"cmd_typ=7&cmd_mod=2&host=omd-$site&service=Dummy+Service&start_time=$now&force_check=on&btnSubmit=Commit\" -r \"Your command request was successfully submitted\"'", like => '/HTTP OK:/' },
-      { cmd => "/bin/su - $site -c './lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/$core/cgi-bin/cmd.cgi -e 200 -P \"cmd_typ=7&cmd_mod=2&host=omd-$site&service=perl+test&start_time=$now&force_check=on&btnSubmit=Commit\" -r \"Your command request was successfully submitted\"'", like => '/HTTP OK:/' },
+      { cmd => "/bin/su - $site -c './lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/$core/cgi-bin/cmd.cgi -e 200 -P \"cmd_typ=7&cmd_mod=2&host=omd-$site&service=Dummy+Service&start_time=$now&force_check=on&btnSubmit=Commit\" -r \"successfully submitted\"'", like => '/HTTP OK:/' },
+      { cmd => "/bin/su - $site -c './lib/nagios/plugins/check_http -H localhost -a omdadmin:omd -u /$site/$core/cgi-bin/cmd.cgi -e 200 -P \"cmd_typ=7&cmd_mod=2&host=omd-$site&service=perl+test&start_time=$now&force_check=on&btnSubmit=Commit\" -r \"successfully submitted\"'", like => '/HTTP OK:/' },
     ];
     for my $test (@{$preps}) {
         TestUtils::test_command($test) or TestUtils::bail_out_clean("no further testing without proper preparation");
@@ -70,12 +70,12 @@ for my $core (qw/nagios icinga/) {
     ##################################################
     # execute some checks
     my $tests = [
-      { cmd => "/bin/grep 'Event broker module.*mod_gearman.o.*initialized successfully' /omd/sites/$site/var/log/$core.log", like => '/successfully/' },
-      { cmd => "/bin/grep 'mod_gearman: initialized version ".$modgearman_version." \(libgearman ".$libgearman_version."\)' /omd/sites/$site/var/log/$core.log", like => '/initialized/' },
+      { cmd => "/bin/grep 'Event broker module.*mod_gearman.o.*initialized successfully' /omd/sites/$site/var/$core/$core.log", like => '/successfully/' },
+      { cmd => "/bin/grep 'mod_gearman: initialized version ".$modgearman_version." \(libgearman ".$libgearman_version."\)' /omd/sites/$site/var/$core/$core.log", like => '/initialized/' },
       { cmd => "/bin/su - $site -c 'bin/send_gearman --server=localhost:4730 --keyfile=etc/mod-gearman/secret.key --host=$host --message=test'" },
       { cmd => "/bin/su - $site -c 'bin/send_gearman --server=localhost:4730 --keyfile=etc/mod-gearman/secret.key --host=$host --service=$service --message=test'" },
-      { cmd => "/bin/grep -i 'mod_gearman: ERROR' /omd/sites/$site/var/log/$core.log", 'exit' => 1, like => '/^\s*$/' },
-      { cmd => "/bin/grep -i 'mod_gearman: WARN' /omd/sites/$site/var/log/$core.log", 'exit' => 1, like => '/^\s*$/' },
+      { cmd => "/bin/grep -i 'mod_gearman: ERROR' /omd/sites/$site/var/$core/$core.log", 'exit' => 1, like => '/^\s*$/' },
+      { cmd => "/bin/grep -i 'mod_gearman: WARN' /omd/sites/$site/var/$core/$core.log", 'exit' => 1, like => '/^\s*$/' },
       { cmd => "/bin/su - $site -c 'lib/$core/plugins/check_gearman -H localhost:4730'", like => '/check_gearman OK/' },
       { cmd => "/bin/su - $site -c 'lib/$core/plugins/check_gearman -H localhost:4730 -q host'", like => '/check_gearman OK/' },
     ];



More information about the omd-commits mailing list