diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2021-12-03 14:02:41 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2021-12-03 14:02:41 +0300 |
commit | d6e5f35f4ec47fe51655eb76fef399d5782360b1 (patch) | |
tree | 39149c362264ec56a9d8c68bfa54170c09ef5e44 /tests/libs/zbxserver | |
parent | 90889f1e48edcdd904e6233e6fc5452a45b99073 (diff) | |
parent | aab41e634284fa954028e19f0945dc6d771a4667 (diff) |
.......... [ZBXNEXT-2579] merged branch 'master' of ssh://git.zabbix.lan:7999/zbx/zabbix into feature/ZBXNEXT-2579-5.5
Diffstat (limited to 'tests/libs/zbxserver')
-rw-r--r-- | tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.c | 5 | ||||
-rw-r--r-- | tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.yaml | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.c b/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.c index 100f94fef0a..2cb748f15a1 100644 --- a/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.c +++ b/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.c @@ -80,8 +80,7 @@ void zbx_mock_test_entry(void **state) int start_detect_period, end_detect_period, detect_period_season_shift, err, detect_period, start_evaluate_period, end_evaluate_period, evaluate_seconds = 0, evaluate_nvalues = 0; - zbx_uint64_t deviations_count; - double result; + double deviations_count, result; char *error = NULL, *evaluate_period = NULL; const char *params, *dev_alg = NULL; DC_ITEM item; @@ -105,7 +104,7 @@ void zbx_mock_test_entry(void **state) item.itemid = ds_item->itemid; item.value_type = ds_item->value_type; - deviations_count = zbx_mock_get_parameter_uint64("in.deviations_count"); + deviations_count = zbx_mock_get_parameter_float("in.deviations_count"); dev_alg = zbx_mock_get_parameter_string("in.dev_alg"); handle = zbx_mock_get_parameter_handle("in"); zbx_vcmock_set_time(handle, "time"); diff --git a/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.yaml b/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.yaml index 7d64c5b4fa5..e92b98d4c4d 100644 --- a/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.yaml +++ b/tests/libs/zbxserver/evaluate_percentage_deviations_in_remainder.yaml @@ -18,7 +18,7 @@ in: - value: 1 ts: 2021-03-27 09:00:00.000000000 +00:00 time: 2021-03-27 15:00:00.000000000 +00:00 - deviations_count: 2 + deviations_count: 2.0 dev_alg: mad detect_period: 1d detect_period_type: 1 @@ -46,7 +46,7 @@ in: - value: 1 ts: 2021-03-27 10:00:00.000000000 +00:00 time: 2021-03-27 16:00:00.000000000 +00:00 - deviations_count: 2 + deviations_count: 2.1 dev_alg: mad detect_period: 1d detect_period_type: 1 @@ -98,7 +98,7 @@ in: - value: 666 ts: 2021-03-27 10:00:00.000000000 +00:00 time: 2021-03-27 16:00:00.000000000 +00:00 - deviations_count: 1 + deviations_count: 1.0001 dev_alg: mad detect_period: 1d detect_period_type: 1 @@ -124,7 +124,7 @@ in: - value: 666 ts: 2021-03-27 10:00:00.000000000 +00:00 time: 2021-03-27 16:00:00.000000000 +00:00 - deviations_count: 4 + deviations_count: 3.9999 dev_alg: mad detect_period: 1d detect_period_type: 1 |