Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2022-01-18 17:10:23 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2022-01-18 17:13:32 +0300
commitce6004627f1b630776b4b9ca0f4b76e1a05cb44d (patch)
tree87fd34d779dda9e8924c8df89dcd6755fe013ab8 /tests
parent8edcf03b5f6bdd6ee6fd89cc891f364af38cce45 (diff)
parent0f04462967af56cfa0a33a24a3820f711d900724 (diff)
.......... [ZBXNEXT-7411] merged branch 'master' of ssh://git.zabbix.lan:7999/zbx/zabbix into feature/ZBXNEXT-7411-5.5
Diffstat (limited to 'tests')
-rw-r--r--tests/libs/zbxsysinfo/common/VFS_FILE_EXISTS.c1
-rw-r--r--tests/libs/zbxtrends/zbx_baseline_get_data.c2
-rw-r--r--tests/libs/zbxtrends/zbx_trends_parse_range.yaml10
-rw-r--r--tests/zabbix_server/service/mock_service.c12
-rw-r--r--tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c2
5 files changed, 27 insertions, 0 deletions
diff --git a/tests/libs/zbxsysinfo/common/VFS_FILE_EXISTS.c b/tests/libs/zbxsysinfo/common/VFS_FILE_EXISTS.c
index b7551344ace..6a90b15951c 100644
--- a/tests/libs/zbxsysinfo/common/VFS_FILE_EXISTS.c
+++ b/tests/libs/zbxsysinfo/common/VFS_FILE_EXISTS.c
@@ -22,6 +22,7 @@
#include "zbxmockassert.h"
#include "zbxmockutil.h"
+#include "sysinfo.h"
#include "file.h"
#define TEST_NAME "VFS_FILE_EXISTS"
diff --git a/tests/libs/zbxtrends/zbx_baseline_get_data.c b/tests/libs/zbxtrends/zbx_baseline_get_data.c
index 7b71ee5d41e..c253dac6bcb 100644
--- a/tests/libs/zbxtrends/zbx_baseline_get_data.c
+++ b/tests/libs/zbxtrends/zbx_baseline_get_data.c
@@ -29,6 +29,8 @@
int __wrap_DBis_null(const char *field);
DB_ROW __wrap_DBfetch(DB_RESULT result);
DB_RESULT __wrap_DBselect(const char *fmt, ...);
+zbx_trend_state_t __wrap_zbx_trends_get_avg(const char *table, zbx_uint64_t itemid, int start, int end,
+ double *value);
int __wrap_DBis_null(const char *field)
{
diff --git a/tests/libs/zbxtrends/zbx_trends_parse_range.yaml b/tests/libs/zbxtrends/zbx_trends_parse_range.yaml
index aabcd17d562..782794fe0b3 100644
--- a/tests/libs/zbxtrends/zbx_trends_parse_range.yaml
+++ b/tests/libs/zbxtrends/zbx_trends_parse_range.yaml
@@ -394,4 +394,14 @@ out:
start: 2020-09-07 00:00:00.000000000 +03:00
end: 2020-09-07 00:00:00.000000000 +03:00
return: SUCCEED
+---
+test case: Valid shift '0h'
+in:
+ param: 1h:now-0h
+ timezone: :Europe/Riga
+ time: 2020-09-01 00:00:00.000000000 +03:00
+out:
+ start: 2020-08-31 23:00:00.000000000 +03:00
+ end: 2020-08-31 23:00:00.000000000 +03:00
+ return: SUCCEED
...
diff --git a/tests/zabbix_server/service/mock_service.c b/tests/zabbix_server/service/mock_service.c
index 95a9197788a..d350e69a8a1 100644
--- a/tests/zabbix_server/service/mock_service.c
+++ b/tests/zabbix_server/service/mock_service.c
@@ -26,6 +26,18 @@
#include "mock_service.h"
+zbx_uint64_t __wrap_DCget_nextid(const char *table_name, int num);
+void *__wrap_zbx_add_event(unsigned char source, unsigned char object, zbx_uint64_t objectid,
+ const zbx_timespec_t *timespec, int value, const char *trigger_description,
+ const char *trigger_expression, const char *trigger_recovery_expression, unsigned char trigger_priority,
+ unsigned char trigger_type, const zbx_vector_ptr_t *trigger_tags,
+ unsigned char trigger_correlation_mode, const char *trigger_correlation_tag,
+ unsigned char trigger_value, const char *trigger_opdata, const char *event_name, const char *error);
+int __wrap_zbx_process_events(zbx_vector_ptr_t *trigger_diff, zbx_vector_uint64_t *triggerids_lock);
+void __wrap_zbx_clean_events(void);
+int __wrap_zbx_interface_availability_is_set(const void *ia);
+
+
/* stubs to satisfy hard link dependenceies */
int get_process_info_by_thread(int local_server_num, unsigned char *local_process_type, int *local_process_num);
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 f5cc6ab37df..3dddaa33981 100644
--- a/tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c
+++ b/tests/zabbix_server/trapper/zbx_trapper_preproc_test_run.c
@@ -38,6 +38,8 @@ int __wrap_DBget_user_by_active_session(const char *sessionid, zbx_user_t *user)
int __wrap_DBget_user_by_auth_token(const char *formatted_auth_token_hash, zbx_user_t *user);
void __wrap_zbx_user_init(zbx_user_t *user);
void __wrap_zbx_user_free(zbx_user_t *user);
+void __wrap_init_result(AGENT_RESULT *result);
+void __wrap_free_result(AGENT_RESULT *result);
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,