[icinga-checkins] icinga.org: icinga-core/mfriedrich/ido: fix tests, broken by previous commits

git at icinga.org git at icinga.org
Sat Aug 25 16:04:54 CEST 2012


Module: icinga-core
Branch: mfriedrich/ido
Commit: 54b8effdcd91262e10325bedd031dbabd86709a7
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=54b8effdcd91262e10325bedd031dbabd86709a7

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sat Aug 25 15:22:26 2012 +0200

fix tests, broken by previous commits

refs #905
refs #2878
refs #2725

---

 t-tap/test_commands.c           |    6 ++++++
 t-tap/test_events.c             |    3 +++
 t-tap/test_icinga_config.c      |    5 +++++
 t-tap/test_timeperiods.c        |    5 +++++
 t/610cgistatus.t                |    4 ++--
 t/var/objects.precache.expected |   24 ++++++++++++++++++++++++
 6 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/t-tap/test_commands.c b/t-tap/test_commands.c
index 6155f25..b673bb7 100644
--- a/t-tap/test_commands.c
+++ b/t-tap/test_commands.c
@@ -77,6 +77,12 @@ command *global_host_event_handler_ptr;
 int sync_state_information(void) {}
 int log_passive_checks = DEFAULT_LOG_PASSIVE_CHECKS;
 int log_external_commands = DEFAULT_LOG_EXTERNAL_COMMANDS;
+
+time_t disable_notifications_expire_time = 0L;
+//void enable_all_notifications() {}
+
+int keep_unknoen_macros = 0;
+
 /* Catch lower calls through these stubs */
 time_t test_start_time = 0L;
 char *test_hostname;
diff --git a/t-tap/test_events.c b/t-tap/test_events.c
index f0ec7a2..00335ba 100644
--- a/t-tap/test_events.c
+++ b/t-tap/test_events.c
@@ -154,6 +154,9 @@ int dump_retained_host_service_states_to_neb = TRUE;
 int stalking_notifications_for_hosts = DEFAULT_STALKING_NOTIFICATIONS_FOR_HOSTS;
 int stalking_notifications_for_services = DEFAULT_STALKING_NOTIFICATIONS_FOR_SERVICES;
 
+time_t disable_notifications_expire_time = 0L;
+void enable_all_notifications() {}
+
 /* Test variables */
 service *svc1 = NULL, *svc2 = NULL, *svc3 = NULL;
 host *host1 = NULL;
diff --git a/t-tap/test_icinga_config.c b/t-tap/test_icinga_config.c
index 1653297..88e9d95 100644
--- a/t-tap/test_icinga_config.c
+++ b/t-tap/test_icinga_config.c
@@ -272,6 +272,11 @@ int stalking_notifications_for_services = DEFAULT_STALKING_NOTIFICATIONS_FOR_SER
 
 time_t          last_program_stop = 0L;
 
+time_t disable_notifications_expire_time = 0L;
+void enable_all_notifications() {}
+
+int             keep_unknown_macros = FALSE;
+
 /* Dummy variables */
 sched_info scheduling_info;
 timed_event event_list_low;
diff --git a/t-tap/test_timeperiods.c b/t-tap/test_timeperiods.c
index c667386..1fbc364 100644
--- a/t-tap/test_timeperiods.c
+++ b/t-tap/test_timeperiods.c
@@ -274,6 +274,11 @@ int dump_retained_host_service_states_to_neb = TRUE;
 int stalking_notifications_for_hosts = DEFAULT_STALKING_NOTIFICATIONS_FOR_HOSTS;
 int stalking_notifications_for_services = DEFAULT_STALKING_NOTIFICATIONS_FOR_SERVICES;
 
+time_t disable_notifications_expire_time = 0L;
+void enable_all_notifications() {}
+
+int             keep_unknown_macros = FALSE;
+
 /* Dummy variables */
 sched_info scheduling_info;
 timed_event event_list_low;
diff --git a/t/610cgistatus.t b/t/610cgistatus.t
index 3258395..cfcbacb 100644
--- a/t/610cgistatus.t
+++ b/t/610cgistatus.t
@@ -27,13 +27,13 @@ $output = run_cgi('etc/cgi.cfg', 'GET', 'host=host1', 'status.cgi');
 
 # check if setting the filter works
 like( $output, '/status.cgi\?host=host1/', "Host value should be set to specific host if passed in" );
-like( $output, '/1 Matching Service Entries Displayed/', "Found the one host" );
+like( $output, '/1 Matching Services/', "Found the one host" );
 
 # run with empty host argument and see if nothing matches
 $output = run_cgi('etc/cgi.cfg', 'GET', 'host=', 'status.cgi');
 
 like( $output, '/status.cgi\?host=&/', "Host value kept as blank if set to blank" );
-like( $output, '/0 Matching Service Entries Displayed/', "Got no hosts because looking for a blank name" );
+like( $output, '/0 Matching Services/', "Got no hosts because looking for a blank name" );
 
 $output = run_cgi('etc/cgi.cfg', 'GET', '', 'status.cgi');
 like( $output, '/status.cgi\?host=all&/', "Host value should be set to all if nothing set initially" );
diff --git a/t/var/objects.precache.expected b/t/var/objects.precache.expected
index f497f28..ee4c8ec 100644
--- a/t/var/objects.precache.expected
+++ b/t/var/objects.precache.expected
@@ -370,6 +370,12 @@ define serviceescalation {
 	service_description	Uses important check command
 	first_notification	-2
 	last_notification	-2
+	first_warning_notification	-2
+	last_warning_notification	-2
+	first_critical_notification	-2
+	last_critical_notification	-2
+	first_unknown_notification	-2
+	last_unknown_notification	-2
 	notification_interval	65.000000
 	escalation_period	none
 	escalation_options	w,u,c,r
@@ -381,6 +387,12 @@ define serviceescalation {
 	service_description	Uses important check command
 	first_notification	-2
 	last_notification	-2
+	first_warning_notification	-2
+	last_warning_notification	-2
+	first_critical_notification	-2
+	last_critical_notification	-2
+	first_unknown_notification	-2
+	last_unknown_notification	-2
 	notification_interval	65.000000
 	escalation_period	none
 	escalation_options	w,u,c,r
@@ -392,6 +404,12 @@ define serviceescalation {
 	service_description	dependent-service
 	first_notification	-2
 	last_notification	-2
+	first_warning_notification	-2
+	last_warning_notification	-2
+	first_critical_notification	-2
+	last_critical_notification	-2
+	first_unknown_notification	-2
+	last_unknown_notification	-2
 	notification_interval	65.000000
 	escalation_period	none
 	escalation_options	w,u,c,r
@@ -403,6 +421,12 @@ define serviceescalation {
 	service_description	master-service
 	first_notification	-2
 	last_notification	-2
+	first_warning_notification	-2
+	last_warning_notification	-2
+	first_critical_notification	-2
+	last_critical_notification	-2
+	first_unknown_notification	-2
+	last_unknown_notification	-2
 	notification_interval	65.000000
 	escalation_period	none
 	escalation_options	w,u,c,r





More information about the icinga-checkins mailing list