diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2022-02-01 15:26:28 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2022-02-01 15:26:28 +0300 |
commit | d0eab52e3e893809b73def90b9426dd2e6917220 (patch) | |
tree | 2905389884b327e67b19df7131d08b414aba3545 /tests | |
parent | 9b6a6c62ee1dc3077b7125bd3a163e1e780b1fb7 (diff) |
.......... [DEV-2064] fixed PR comments 2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libs/zbxdbcache/dc_check_maintenance_period.c | 1 | ||||
-rw-r--r-- | tests/libs/zbxdbcache/dc_expand_user_macros_in_func_params.c | 2 | ||||
-rw-r--r-- | tests/libs/zbxdbcache/dc_item_poller_type_update.c | 1 | ||||
-rw-r--r-- | tests/libs/zbxdbcache/dc_maintenance_match_tags.c | 2 | ||||
-rw-r--r-- | tests/libs/zbxdbcache/zbx_vc_common.c | 4 | ||||
-rw-r--r-- | tests/libs/zbxdbcache/zbx_vc_common.h | 4 | ||||
-rw-r--r-- | tests/mocks/configcache/configcache.c | 2 | ||||
-rw-r--r-- | tests/mocks/configcache/configcache.h | 9 | ||||
-rw-r--r-- | tests/mocks/configcache/hosts.c | 2 | ||||
-rw-r--r-- | tests/mocks/configcache/usermacros.c | 2 |
10 files changed, 9 insertions, 20 deletions
diff --git a/tests/libs/zbxdbcache/dc_check_maintenance_period.c b/tests/libs/zbxdbcache/dc_check_maintenance_period.c index a942ff7577f..cc49551eaf4 100644 --- a/tests/libs/zbxdbcache/dc_check_maintenance_period.c +++ b/tests/libs/zbxdbcache/dc_check_maintenance_period.c @@ -28,7 +28,6 @@ #include "dbcache.h" #include "log.h" -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" #include "dbconfig_maintenance_test.h" diff --git a/tests/libs/zbxdbcache/dc_expand_user_macros_in_func_params.c b/tests/libs/zbxdbcache/dc_expand_user_macros_in_func_params.c index be351068c26..75048dc4cb2 100644 --- a/tests/libs/zbxdbcache/dc_expand_user_macros_in_func_params.c +++ b/tests/libs/zbxdbcache/dc_expand_user_macros_in_func_params.c @@ -27,8 +27,6 @@ #include "zbxalgo.h" #include "dbcache.h" #include "mutexs.h" - -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" #include "configcache_mock.h" diff --git a/tests/libs/zbxdbcache/dc_item_poller_type_update.c b/tests/libs/zbxdbcache/dc_item_poller_type_update.c index 656f1750f50..674c1f2d59a 100644 --- a/tests/libs/zbxdbcache/dc_item_poller_type_update.c +++ b/tests/libs/zbxdbcache/dc_item_poller_type_update.c @@ -32,7 +32,6 @@ #include "common.h" #include "mutexs.h" -#define ZBX_DBCONFIG_IMPL #include "dbcache.h" #include "dbconfig.h" #include "dc_item_poller_type_update_test.h" diff --git a/tests/libs/zbxdbcache/dc_maintenance_match_tags.c b/tests/libs/zbxdbcache/dc_maintenance_match_tags.c index f4faf31a7cd..81422212403 100644 --- a/tests/libs/zbxdbcache/dc_maintenance_match_tags.c +++ b/tests/libs/zbxdbcache/dc_maintenance_match_tags.c @@ -26,8 +26,6 @@ #include "mutexs.h" #include "zbxalgo.h" #include "dbcache.h" - -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" #include "dbconfig_maintenance_test.h" diff --git a/tests/libs/zbxdbcache/zbx_vc_common.c b/tests/libs/zbxdbcache/zbx_vc_common.c index 7a0d101c411..ce732b608c8 100644 --- a/tests/libs/zbxdbcache/zbx_vc_common.c +++ b/tests/libs/zbxdbcache/zbx_vc_common.c @@ -17,6 +17,8 @@ ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ +#include "zbx_vc_common.h" + #include "zbxmocktest.h" #include "zbxmockdata.h" #include "zbxmockassert.h" @@ -28,8 +30,6 @@ #include "valuecache_test.h" #include "mocks/valuecache/valuecache_mock.h" -#include "zbx_vc_common.h" - extern zbx_uint64_t CONFIG_VALUE_CACHE_SIZE; static void zbx_vc_test_check_result(zbx_uint64_t cache_hits, zbx_uint64_t cache_misses) diff --git a/tests/libs/zbxdbcache/zbx_vc_common.h b/tests/libs/zbxdbcache/zbx_vc_common.h index 796b72d8a02..e7ef5d9dd02 100644 --- a/tests/libs/zbxdbcache/zbx_vc_common.h +++ b/tests/libs/zbxdbcache/zbx_vc_common.h @@ -20,6 +20,10 @@ #ifndef ZBX_VC_COMMON_H #define ZBX_VC_COMMON_H +#include "zbxalgo.h" +#include "zbxhistory.h" +#include "zbxmockdata.h" + typedef void (*zbx_vc_test_add_values_setup_cb)(zbx_mock_handle_t *handle, zbx_vector_ptr_t *history, int *err, const char **data, int *ret_flush); typedef void (*zbx_vc_test_get_value_setup_cb)(zbx_mock_handle_t *handle, zbx_uint64_t *itemid, diff --git a/tests/mocks/configcache/configcache.c b/tests/mocks/configcache/configcache.c index 4319cca2f23..152be5849a7 100644 --- a/tests/mocks/configcache/configcache.c +++ b/tests/mocks/configcache/configcache.c @@ -29,8 +29,6 @@ #include "zbxalgo.h" #include "dbcache.h" #include "mutexs.h" - -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" zbx_mock_config_t mock_config; diff --git a/tests/mocks/configcache/configcache.h b/tests/mocks/configcache/configcache.h index 944e98730a0..1880d92dce8 100644 --- a/tests/mocks/configcache/configcache.h +++ b/tests/mocks/configcache/configcache.h @@ -17,6 +17,9 @@ ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ +#ifndef ZABBIX_CONFIGCACHE_H +#define ZABBIX_CONFIGCACHE_H + #include "zbxmocktest.h" #include "zbxmockdata.h" #include "zbxmockassert.h" @@ -27,15 +30,9 @@ #include "zbxalgo.h" #include "dbcache.h" #include "mutexs.h" - -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" - #include "configcache_mock.h" -#ifndef ZABBIX_CONFIGCACHE_H -#define ZABBIX_CONFIGCACHE_H - typedef struct { ZBX_DC_CONFIG dc; diff --git a/tests/mocks/configcache/hosts.c b/tests/mocks/configcache/hosts.c index ea67b094aa2..a3eeb03a51a 100644 --- a/tests/mocks/configcache/hosts.c +++ b/tests/mocks/configcache/hosts.c @@ -27,9 +27,7 @@ #include "zbxalgo.h" #include "dbcache.h" #include "mutexs.h" -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" - #include "configcache.h" extern zbx_mock_config_t mock_config; diff --git a/tests/mocks/configcache/usermacros.c b/tests/mocks/configcache/usermacros.c index fb80e499d58..9d629c5f74e 100644 --- a/tests/mocks/configcache/usermacros.c +++ b/tests/mocks/configcache/usermacros.c @@ -27,9 +27,7 @@ #include "zbxalgo.h" #include "dbcache.h" #include "mutexs.h" -#define ZBX_DBCONFIG_IMPL #include "dbconfig.h" - #include "configcache.h" extern zbx_mock_config_t mock_config; |