diff options
author | Andrejs Tumilovics <andrejs.tumilovics@zabbix.com> | 2020-01-09 13:51:42 +0300 |
---|---|---|
committer | Andrejs Tumilovics <andrejs.tumilovics@zabbix.com> | 2020-01-09 14:05:50 +0300 |
commit | 0e79967a5f3537b9b7d19df1824dba9ce8da6789 (patch) | |
tree | c13ae98f3ebbe15620e07d3b02eb809daa3011a1 /tests/libs/zbxjson | |
parent | 67ac86f378ac321a94e8cd11375c7a44d30336d6 (diff) |
........S. [ZBX-17127] fixed crash on jsonpath function processing
(cherry picked from commit 9727ebd2709c72ec8b74ae837feed54cc196c5ce)
Diffstat (limited to 'tests/libs/zbxjson')
-rw-r--r-- | tests/libs/zbxjson/zbx_jsonpath_query.yaml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/libs/zbxjson/zbx_jsonpath_query.yaml b/tests/libs/zbxjson/zbx_jsonpath_query.yaml index 25b1e8888fc..a775a67a707 100644 --- a/tests/libs/zbxjson/zbx_jsonpath_query.yaml +++ b/tests/libs/zbxjson/zbx_jsonpath_query.yaml @@ -513,6 +513,22 @@ out: return: SUCCEED value: 5 --- +test case: Query $.bad.path.first().length() +include: &include zbx_jsonpath_query.inc.yaml +in: + data: *include + path: $.bad.path.first().length() +out: + return: FAIL +--- +test case: Query $.[?(@.ElementName == "test")].values.first().length() +include: &include zbx_jsonpath_query.inc.yaml +in: + data: *include + path: $.[?(@.ElementName == "test")].values.first().length() +out: + return: FAIL +--- test case: Query $.length() from ["a", "b"] in: data: '["a", "b"]' |