[icinga-checkins] icinga.org: icinga-core/hbaecker/threaded-trimming: Fix Perl tests

git at icinga.org git at icinga.org
Sun Jan 10 13:39:39 CET 2010


Module: icinga-core
Branch: hbaecker/threaded-trimming
Commit: 189e8a68c0ad23c301992bb335c6bd28daadadb2
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=189e8a68c0ad23c301992bb335c6bd28daadadb2

Author: Hendrik Baecker <andurin at process-zero.de>
Date:   Sat Jan  9 10:56:07 2010 +0100

Fix Perl tests

This patch correct first steps to quality checks

---

 t/623cmd-local.t                |    6 +++---
 t/705nagiostats.t               |   10 +++++-----
 t/900-configparsing.t           |    2 +-
 t/910-noservice.t               |    2 +-
 t/var/objects.precache.expected |    4 ++--
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/t/623cmd-local.t b/t/623cmd-local.t
index 74c1a8c..56aa94c 100644
--- a/t/623cmd-local.t
+++ b/t/623cmd-local.t
@@ -16,7 +16,7 @@ my $local_cgi = "$cgi_dir/cmd.cgi";
 my $output;
 
 my $cmd_typ = '';
-my $remote_user = 'REMOTE_USER=nagiosadmin';
+my $remote_user = 'REMOTE_USER=icingaadmin';
 
 plan tests => 110;
 
@@ -119,13 +119,13 @@ unlike( $output, "/Sorry, but no information is available for this command./", "
 # Tests against command type '13'
 $cmd_typ=13;
 $output = `NAGIOS_CGI_CONFIG=etc/cgi.cfg $remote_user REQUEST_METHOD=GET QUERY_STRING='cmd_typ=$cmd_typ' $local_cgi`;
-like( $output, "/You are requesting to restart the Nagios process/", "$local_cgi with cmd_typ=$cmd_typ shows request to restart nagios" );
+like( $output, "/You are requesting to restart the Icinga process/", "$local_cgi with cmd_typ=$cmd_typ shows request to restart icinga" );
 unlike( $output, "/Sorry, but no information is available for this command./", "$local_cgi with cmd_typ=$cmd_typ has a command description" );
 
 # Tests against command type '14'
 $cmd_typ=14;
 $output = `NAGIOS_CGI_CONFIG=etc/cgi.cfg $remote_user REQUEST_METHOD=GET QUERY_STRING='cmd_typ=$cmd_typ' $local_cgi`;
-like( $output, "/You are requesting to shutdown the Nagios process/", "$local_cgi with cmd_typ=$cmd_typ shows request to shutdown nagios" );
+like( $output, "/You are requesting to shutdown the Icinga process/", "$local_cgi with cmd_typ=$cmd_typ shows request to shutdown icinga" );
 unlike( $output, "/Sorry, but no information is available for this command./", "$local_cgi with cmd_typ=$cmd_typ has a command description" );
 
 # Tests against command type '15'
diff --git a/t/705nagiostats.t b/t/705nagiostats.t
index 4974294..d36a08f 100644
--- a/t/705nagiostats.t
+++ b/t/705nagiostats.t
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # 
-# Checks nagiostats
+# Checks icingastats
 
 use warnings;
 use strict;
@@ -10,19 +10,19 @@ use FindBin qw($Bin);
 chdir $Bin or die "Cannot chdir";
 
 my $topdir = "$Bin/..";
-my $nagiostats = "$topdir/base/nagiostats";
+my $icingastats = "$topdir/base/icingastats";
 my $etc = "$Bin/etc";
 
 plan tests => 5;
 
-my $output = `$nagiostats -c "$etc/nagios-does-not-exit.cfg"`;
+my $output = `$icingastats -c "$etc/nagios-does-not-exit.cfg"`;
 isnt( $?, 0, "Bad return code with no config file" );
 like( $output, "/Error processing config file/", "No config file" );
 
-$output = `$nagiostats -c "$etc/nagios-no-status.cfg"`;
+$output = `$icingastats -c "$etc/nagios-no-status.cfg"`;
 isnt( $?, 0, "Bad return code with no status file" );
 like( $output, "/Error reading status file 'var/status.dat.no.such.file': No such file or directory/", "No config file" );
 
-$output = `$nagiostats -c "$etc/nagios-no-status.cfg" -m NUMHSTUP`;
+$output = `$icingastats -c "$etc/nagios-no-status.cfg" -m NUMHSTUP`;
 isnt( $?, 0, "Bad return code with no status file in MRTG mode" );
 
diff --git a/t/900-configparsing.t b/t/900-configparsing.t
index ef04437..7727791 100644
--- a/t/900-configparsing.t
+++ b/t/900-configparsing.t
@@ -10,7 +10,7 @@ use FindBin qw($Bin);
 chdir $Bin or die "Cannot chdir";
 
 my $topdir = "$Bin/..";
-my $nagios = "$topdir/base/nagios";
+my $nagios = "$topdir/base/icinga";
 my $etc = "$Bin/etc";
 my $precache = "$Bin/var/objects.precache";
 
diff --git a/t/910-noservice.t b/t/910-noservice.t
index 0038196..756b656 100644
--- a/t/910-noservice.t
+++ b/t/910-noservice.t
@@ -10,7 +10,7 @@ use FindBin qw($Bin);
 chdir $Bin or die "Cannot chdir";
 
 my $topdir = "$Bin/..";
-my $nagios = "$topdir/base/nagios";
+my $nagios = "$topdir/base/icinga";
 my $etc = "$Bin/etc";
 my $precache = "$Bin/var/objects.precache";
 
diff --git a/t/var/objects.precache.expected b/t/var/objects.precache.expected
index 8751cc8..89a482c 100644
--- a/t/var/objects.precache.expected
+++ b/t/var/objects.precache.expected
@@ -1,8 +1,8 @@
 ########################################
-#       NAGIOS OBJECT CACHE FILE
+#       ICINGA OBJECT CACHE FILE
 #
 # THIS FILE IS AUTOMATICALLY GENERATED
-# BY NAGIOS.  DO NOT MODIFY THIS FILE!
+# BY ICINGA.  DO NOT MODIFY THIS FILE!
 #
 ########################################
 





More information about the icinga-checkins mailing list