REST: Fixed indexed script/template tests
The clients don't have access to the error message for matching purposes. Rewritten tests to work with the clients
This commit is contained in:
parent
65b85566a0
commit
cccc8867b9
|
@ -28,14 +28,26 @@
|
||||||
id: "1"
|
id: "1"
|
||||||
lang: "groovy"
|
lang: "groovy"
|
||||||
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
|
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
|
||||||
- match: { "error": /ElasticsearchIllegalArgumentException\SUnable\sto\sparse.*/ }
|
|
||||||
|
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: /ElasticsearchIllegalArgumentException.Unable.to.parse.*/
|
||||||
|
put_script:
|
||||||
|
id: "1"
|
||||||
|
lang: "groovy"
|
||||||
|
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: request
|
catch: request
|
||||||
put_script:
|
put_script:
|
||||||
id: "1"
|
id: "1"
|
||||||
lang: "foobar"
|
lang: "foobar"
|
||||||
body: { "script" : "_score * doc[\"myParent.weight\"].value" }
|
body: { "script" : "_score * doc[\"myParent.weight\"].value" }
|
||||||
- match: { "error": /ElasticsearchIllegalArgumentException\Sscript_lang\snot\ssupported/ }
|
|
||||||
|
- do:
|
||||||
|
catch: /ElasticsearchIllegalArgumentException.script_lang.not.supported/
|
||||||
|
put_script:
|
||||||
|
id: "1"
|
||||||
|
lang: "foobar"
|
||||||
|
body: { "script" : "_score * doc[\"myParent.weight\"].value" }
|
||||||
|
|
||||||
|
|
|
@ -25,4 +25,9 @@
|
||||||
put_template:
|
put_template:
|
||||||
id: "1"
|
id: "1"
|
||||||
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
|
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
|
||||||
- match: { "error": /ElasticsearchIllegalArgumentException\SUnable\sto\sparse.*/ }
|
|
||||||
|
- do:
|
||||||
|
catch: /ElasticsearchIllegalArgumentException\SUnable\sto\sparse.*/
|
||||||
|
put_template:
|
||||||
|
id: "1"
|
||||||
|
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
|
||||||
|
|
Loading…
Reference in New Issue