From 21c9ae3a39807e462505784a4cb464749f791f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksejs=20=C5=A0estakovs?= Date: Thu, 14 Feb 2019 10:12:34 +0000 Subject: .......... [DEV-974] unit tests for prometheus (initial) --- tests/zabbix_server/preprocessor/Makefile.am | 1 + tests/zabbix_server/preprocessor/zbx_item_preproc.c | 4 ++++ tests/zabbix_server/preprocessor/zbx_item_preproc.yaml | 2 -- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/zabbix_server') diff --git a/tests/zabbix_server/preprocessor/Makefile.am b/tests/zabbix_server/preprocessor/Makefile.am index 45b52ee8a26..445de4f3d5e 100644 --- a/tests/zabbix_server/preprocessor/Makefile.am +++ b/tests/zabbix_server/preprocessor/Makefile.am @@ -4,6 +4,7 @@ noinst_PROGRAMS = zbx_item_preproc JSON_LIBS = \ $(top_srcdir)/tests/libzbxmocktest.a \ $(top_srcdir)/tests/libzbxmockdata.a \ + $(top_srcdir)/src/libs/zbxprometheus/libzbxprometheus.a \ $(top_srcdir)/src/libs/zbxjson/libzbxjson.a \ $(top_srcdir)/src/libs/zbxalgo/libzbxalgo.a \ $(top_srcdir)/src/libs/zbxcommon/libzbxcommon.a \ diff --git a/tests/zabbix_server/preprocessor/zbx_item_preproc.c b/tests/zabbix_server/preprocessor/zbx_item_preproc.c index bd4114f1491..756fb608639 100644 --- a/tests/zabbix_server/preprocessor/zbx_item_preproc.c +++ b/tests/zabbix_server/preprocessor/zbx_item_preproc.c @@ -70,6 +70,10 @@ static int str_to_preproc_type(const char *str) return ZBX_PREPROC_THROTTLE_VALUE; if (0 == strcmp(str, "ZBX_PREPROC_THROTTLE_TIMED_VALUE")) return ZBX_PREPROC_THROTTLE_TIMED_VALUE; + if (0 == strcmp(str, "ZBX_PREPROC_PROMETHEUS_PATTERN")) + return ZBX_PREPROC_PROMETHEUS_PATTERN; + if (0 == strcmp(str, "ZBX_PREPROC_PROMETHEUS_TO_JSON")) + return ZBX_PREPROC_PROMETHEUS_TO_JSON; fail_msg("unknow preprocessing step type: %s", str); return FAIL; diff --git a/tests/zabbix_server/preprocessor/zbx_item_preproc.yaml b/tests/zabbix_server/preprocessor/zbx_item_preproc.yaml index 7642ffe3d6d..bd10bc79f2c 100644 --- a/tests/zabbix_server/preprocessor/zbx_item_preproc.yaml +++ b/tests/zabbix_server/preprocessor/zbx_item_preproc.yaml @@ -1550,5 +1550,3 @@ out: return: SUCCEED value: 225000000000000000000 ... - - -- cgit v1.2.3