diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libs/zbxserver/evaluate_function.c | 7 | ||||
-rw-r--r-- | tests/libs/zbxsysinfo/parse_item_key.c | 2 | ||||
-rw-r--r-- | tests/libs/zbxtrends/zbx_trends_parse_range.c | 4 | ||||
-rw-r--r-- | tests/mocks/configcache/configcache.c | 1 | ||||
-rw-r--r-- | tests/mocks/configcache/hosts.c | 2 | ||||
-rw-r--r-- | tests/mocks/configcache/usermacros.c | 2 | ||||
-rw-r--r-- | tests/mocks/valuecache/valuecache_mock.c | 1 | ||||
-rw-r--r-- | tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c | 6 |
8 files changed, 25 insertions, 0 deletions
diff --git a/tests/libs/zbxserver/evaluate_function.c b/tests/libs/zbxserver/evaluate_function.c index 93ab980c286..65f8c509d37 100644 --- a/tests/libs/zbxserver/evaluate_function.c +++ b/tests/libs/zbxserver/evaluate_function.c @@ -32,6 +32,13 @@ int __wrap_substitute_simple_macros(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event, zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item, DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type, char *error, + int maxerrlen); + +int __wrap_DCget_data_expected_from(zbx_uint64_t itemid, int *seconds); + +int __wrap_substitute_simple_macros(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event, + zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item, + DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type, char *error, int maxerrlen) { ZBX_UNUSED(actionid); diff --git a/tests/libs/zbxsysinfo/parse_item_key.c b/tests/libs/zbxsysinfo/parse_item_key.c index 1c259a6e592..d97c6dc44ed 100644 --- a/tests/libs/zbxsysinfo/parse_item_key.c +++ b/tests/libs/zbxsysinfo/parse_item_key.c @@ -23,6 +23,8 @@ #include "common.h" #include "sysinfo.h" +const char *request_parameter_type_to_str(zbx_request_parameter_type_t type); + const char *request_parameter_type_to_str(zbx_request_parameter_type_t type) { const char *ret = "undefined"; diff --git a/tests/libs/zbxtrends/zbx_trends_parse_range.c b/tests/libs/zbxtrends/zbx_trends_parse_range.c index 3a7f9f58843..c96cfffd629 100644 --- a/tests/libs/zbxtrends/zbx_trends_parse_range.c +++ b/tests/libs/zbxtrends/zbx_trends_parse_range.c @@ -27,6 +27,10 @@ #include "log.h" #include "db.h" +int __wrap_DBis_null(const char *field); +DB_ROW __wrap_DBfetch(DB_RESULT result); +DB_RESULT __wrap_DBselect(const char *fmt, ...); + int __wrap_DBis_null(const char *field) { ZBX_UNUSED(field); diff --git a/tests/mocks/configcache/configcache.c b/tests/mocks/configcache/configcache.c index e05a0573e8b..060405ff466 100644 --- a/tests/mocks/configcache/configcache.c +++ b/tests/mocks/configcache/configcache.c @@ -35,6 +35,7 @@ zbx_mock_config_t mock_config; +void *__wrap_zbx_hashset_search(zbx_hashset_t *hs, const void *data); void *__real_zbx_hashset_search(zbx_hashset_t *hs, const void *data); void mock_config_free_user_macros(void); diff --git a/tests/mocks/configcache/hosts.c b/tests/mocks/configcache/hosts.c index 420a6be6b48..b4aff05d900 100644 --- a/tests/mocks/configcache/hosts.c +++ b/tests/mocks/configcache/hosts.c @@ -34,6 +34,8 @@ extern zbx_mock_config_t mock_config; +void mock_config_free_hosts(void); + void mock_config_load_hosts(const char *path) { zbx_mock_handle_t hhosts, handle; diff --git a/tests/mocks/configcache/usermacros.c b/tests/mocks/configcache/usermacros.c index 33866f3bfd7..1ddc951588f 100644 --- a/tests/mocks/configcache/usermacros.c +++ b/tests/mocks/configcache/usermacros.c @@ -34,6 +34,8 @@ extern zbx_mock_config_t mock_config; +void mock_config_free_user_macros(void); + static int config_gmacro_context_compare(const void *d1, const void *d2) { const ZBX_DC_GMACRO *m1 = *(const ZBX_DC_GMACRO **)d1; diff --git a/tests/mocks/valuecache/valuecache_mock.c b/tests/mocks/valuecache/valuecache_mock.c index ff21d2d5d08..26e0dcbb54a 100644 --- a/tests/mocks/valuecache/valuecache_mock.c +++ b/tests/mocks/valuecache/valuecache_mock.c @@ -55,6 +55,7 @@ int __wrap_zbx_history_add_values(const zbx_vector_ptr_t *history); int __wrap_zbx_history_sql_init(zbx_history_iface_t *hist, unsigned char value_type, char **error); int __wrap_zbx_history_elastic_init(zbx_history_iface_t *hist, unsigned char value_type, char **error); time_t __wrap_time(time_t *ptr); +void __wrap_zbx_timespec(zbx_timespec_t *ts); void zbx_vc_set_mode(int mode); diff --git a/tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c b/tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c index 4f4a93d78f2..456c69b26fa 100644 --- a/tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c +++ b/tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c @@ -37,6 +37,12 @@ zbx_es_t es_engine; int __wrap_zbx_preprocessor_test(unsigned char value_type, const char *value, const zbx_timespec_t *ts, const zbx_vector_ptr_t *steps, zbx_vector_ptr_t *results, zbx_vector_ptr_t *history, + char **preproc_error, char **error); + +int __wrap_DBget_user_by_active_session(const char *sessionid, zbx_user_t *user); + +int __wrap_zbx_preprocessor_test(unsigned char value_type, const char *value, const zbx_timespec_t *ts, + const zbx_vector_ptr_t *steps, zbx_vector_ptr_t *results, zbx_vector_ptr_t *history, char **preproc_error, char **error) { int i, results_num; |