um_cache_resolve(cache, hostids.values, hostids.values_num, zbx_mock_get_parameter_string("in.macro"),
#include "zbxmockassert.h"
#include "zbxcacheconfig/user_macro.h"
#include "um_cache_mock.h"
static void mock_get_hostids(zbx_vector_uint64_t *hostids, zbx_mock_handle_t handle)
zbx_mock_handle_t hhostid;
while (ZBX_MOCK_END_OF_VECTOR != (err = (zbx_mock_vector_element(handle, &hhostid))))
if (ZBX_MOCK_SUCCESS != (err = zbx_mock_string(hhostid, &hostid_s)))
fail_msg("Cannot read hostid: %s", zbx_mock_error_string(err));
if (SUCCEED != zbx_is_uint64(hostid_s, &hostid))
fail_msg("Invalid hostid: %s", hostid_s);
zbx_vector_uint64_append(hostids, hostid);
void zbx_mock_test_entry(void **state)
zbx_um_mock_cache_t mock_cache0, mock_cache;
zbx_dbsync_t gmacros, hmacros, htmpls;
zbx_vector_uint64_t hostids;
zbx_config_vault_t config_vault = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
zbx_vector_uint64_create(&hostids);
um_mock_cache_init(&mock_cache0, -1);
um_mock_cache_init(&mock_cache, zbx_mock_get_parameter_handle("in.config"));
zbx_dbsync_init(&gmacros, ZBX_DBSYNC_UPDATE);
zbx_dbsync_init(&hmacros, ZBX_DBSYNC_UPDATE);