diff options
Diffstat (limited to 'tests/zbxmockdata.c')
-rw-r--r-- | tests/zbxmockdata.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/zbxmockdata.c b/tests/zbxmockdata.c index 2129c918c1a..ffbca1a843c 100644 --- a/tests/zbxmockdata.c +++ b/tests/zbxmockdata.c @@ -612,7 +612,9 @@ static zbx_mock_error_t zbx_mock_parameter_rec(const yaml_node_t *node, const ch /* end of the path, return whatever has been found */ if ('\0' == *pnext) { - *parameter = zbx_mock_handle_alloc(node); + if (NULL != parameter) + *parameter = zbx_mock_handle_alloc(node); + return ZBX_MOCK_SUCCESS; } @@ -662,6 +664,11 @@ zbx_mock_error_t zbx_mock_parameter(const char *path, zbx_mock_handle_t *paramet return zbx_mock_parameter_rec(root, path, parameter); } +zbx_mock_error_t zbx_mock_parameter_exists(const char *path) +{ + return zbx_mock_parameter_rec(root, path, NULL); +} + zbx_mock_error_t zbx_mock_uint64(zbx_mock_handle_t object, zbx_uint64_t *value) { const zbx_mock_pool_handle_t *handle; |