Clinton Gormley cccc8867b9 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
2014-07-16 17:31:31 +02:00

54 lines
1.2 KiB
YAML

---
"Indexed script":
- do:
put_script:
id: "1"
lang: "groovy"
body: { "script": "_score * doc[\"myParent.weight\"].value" }
- match: { _id: "1" }
- do:
get_script:
id: "1"
lang: "groovy"
- match: { "script": "_score * doc[\"myParent.weight\"].value" }
- do:
delete_script:
id: "1"
lang: "groovy"
- match: { found: true }
- match: { _index: ".scripts" }
- match: { _id: "1" }
- do:
catch: request
put_script:
id: "1"
lang: "groovy"
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
- do:
catch: /ElasticsearchIllegalArgumentException.Unable.to.parse.*/
put_script:
id: "1"
lang: "groovy"
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
- do:
catch: request
put_script:
id: "1"
lang: "foobar"
body: { "script" : "_score * doc[\"myParent.weight\"].value" }
- do:
catch: /ElasticsearchIllegalArgumentException.script_lang.not.supported/
put_script:
id: "1"
lang: "foobar"
body: { "script" : "_score * doc[\"myParent.weight\"].value" }