|
1 | 1 | #ifndef NAGIOS_TEST_STUBS__
|
2 | 2 | #define NAGIOS_TEST_STUBS__
|
3 | 3 | #include "macros.h"
|
| 4 | +#include "defaults.h" |
| 5 | +#include "logging.h" |
4 | 6 |
|
5 | 7 | /* Loads of variables + stubbed functions */
|
6 | 8 | char *config_file = "etc/nagios.cfg";
|
@@ -67,7 +69,8 @@ int save_state_information(int int1) {}
|
67 | 69 | int check_for_external_commands(void) {}
|
68 | 70 | int check_time_against_period(time_t time_t1, timeperiod *timeperiod) {}
|
69 | 71 | time_t get_next_log_rotation_time(void) {}
|
70 |
| -int handle_scheduled_downtime_by_id(unsigned long long1) {} |
| 72 | +int handle_scheduled_downtime_start_by_id(unsigned long long1) {} |
| 73 | +int handle_scheduled_downtime_end_by_id(unsigned long long1) {} |
71 | 74 | #ifndef TEST_LOGGING
|
72 | 75 | int log_host_event(host *hst) {}
|
73 | 76 | int log_service_event_flag = 0;
|
@@ -119,10 +122,10 @@ int update_service_status(service *svc, int aggregated_dump) {}
|
119 | 122 | int update_all_status_data(void) {}
|
120 | 123 | char *check_result_path = NULL;
|
121 | 124 | int process_check_result_queue(char *dirname) {}
|
122 |
| -service * find_service(char *host_name, char *svc_desc) {} |
| 125 | +struct service * find_service(const char *host_name, const char *svc_desc) {} |
123 | 126 | int delete_check_result_file(char *fname) {}
|
124 | 127 | int free_check_result(check_result *info) {}
|
125 |
| -host * find_host(char *name) {} |
| 128 | +struct host * find_host(const char *name) {} |
126 | 129 | int max_check_reaper_time = DEFAULT_MAX_REAPER_TIME;
|
127 | 130 | check_result *read_check_result(void) {}
|
128 | 131 | int broker_service_check(int type, int flags, int attr, service *svc, int check_type, struct timeval start_time, struct timeval end_time, char *cmd, double latency, double exectime, int timeout, int early_timeout, int retcode, char *cmdline, struct timeval *timestamp) {}
|
@@ -183,5 +186,6 @@ int passive_host_checks_are_soft = DEFAULT_PASSIVE_HOST_CHECKS_SOFT;
|
183 | 186 | int translate_passive_host_checks = DEFAULT_TRANSLATE_PASSIVE_HOST_CHECKS;
|
184 | 187 | int enable_predictive_host_dependency_checks = DEFAULT_ENABLE_PREDICTIVE_HOST_DEPENDENCY_CHECKS;
|
185 | 188 |
|
| 189 | +int main() {} |
186 | 190 |
|
187 | 191 | #endif
|
0 commit comments