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:
Diffstat (limited to 'tests/libs/zbxeval/zbx_eval_execute.yaml')
-rw-r--r--tests/libs/zbxeval/zbx_eval_execute.yaml74
1 files changed, 74 insertions, 0 deletions
diff --git a/tests/libs/zbxeval/zbx_eval_execute.yaml b/tests/libs/zbxeval/zbx_eval_execute.yaml
index ca7f2307959..d24a1779ef3 100644
--- a/tests/libs/zbxeval/zbx_eval_execute.yaml
+++ b/tests/libs/zbxeval/zbx_eval_execute.yaml
@@ -2147,4 +2147,78 @@ in:
expression: 'power(10,300)*power(10,300)'
out:
result: FAIL
+---
+test case: Expression 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, +Inf, 3)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, "+Inf", 3)'
+out:
+ result: SUCCEED
+ value: '0.2'
+---
+test case: Expression 'histogram_quantile(0.8, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, +Inf, 80)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, "+Inf", 80)'
+out:
+ result: SUCCEED
+ value: '1.08'
+---
+test case: Expression 'histogram_quantile(0.8, 0.2, 10, 0.4, 20, 1.0, 25, 1.0, 35, 1.2, 70, +Inf, 80)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.2, 10, 0.4, 20, 1.0, 25, 1.0, 35, 1.2, 70, "+Inf", 80)'
+out:
+ result: SUCCEED
+ value: '1.08'
+---
+test case: Expression 'histogram_quantile(0.8, 0.2, 10, 1.0, 60, 0.4, 20, 1.2, 70, +Inf, 80)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.2, 10, 1.0, 60, 0.4, 20, 1.2, 70, "+Inf", 80)'
+out:
+ result: SUCCEED
+ value: '1.08'
+---
+test case: Expression 'histogram_quantile(0.8, 0.1, 1)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.1, 1)'
+out:
+ result: FAIL
+---
+test case: Expression 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, 0.3, 3)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, 0.3, 3)'
+out:
+ result: FAIL
+---
+test case: Expression 'histogram_quantile(0.8, 0.2, 2, 0.1, "+Inf", 3)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.2, 2, 0.1, "+Inf", 3)'
+out:
+ result: FAIL
+---
+test case: Expression 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, +Inf, 0)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, "+Inf", 0)'
+out:
+ result: FAIL
+---
+test case: Expression 'histogram_quantile(-0.1, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, +Inf, 80)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(-0.1, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, "+Inf", 80)'
+out:
+ result: FAIL
+---
+test case: Expression 'histogram_quantile(1.1, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, +Inf, 80)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(1.1, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, "+Inf", 80)'
+out:
+ result: FAIL
...