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
diff options
context:
space:
mode:
authorAleksejs Ĺ estakovs <aleksejs.sestakovs@zabbix.com>2019-02-14 13:12:34 +0300
committerAleksejs Ĺ estakovs <aleksejs.sestakovs@zabbix.com>2019-02-14 13:12:34 +0300
commit21c9ae3a39807e462505784a4cb464749f791f45 (patch)
tree4a59843abb27d0bd6fe6f1df7b94b30786eaa338 /tests/zabbix_server
parent76b493c180cb5cdfe6c2154d27dcb1a5bac474fe (diff)
.......... [DEV-974] unit tests for prometheus (initial)
Diffstat (limited to 'tests/zabbix_server')
-rw-r--r--tests/zabbix_server/preprocessor/Makefile.am1
-rw-r--r--tests/zabbix_server/preprocessor/zbx_item_preproc.c4
-rw-r--r--tests/zabbix_server/preprocessor/zbx_item_preproc.yaml2
3 files changed, 5 insertions, 2 deletions
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
...
-
-