Convert put_template uses to put_script in rest tests

Original commit: elastic/x-pack-elasticsearch@5f5f52b955
This commit is contained in:
Ryan Ernst 2017-07-13 00:01:56 -07:00
parent e4c8851a24
commit df41b8342d
3 changed files with 30 additions and 15 deletions

View File

@ -93,12 +93,17 @@ setup:
}
- do:
put_template:
put_script:
id: "1"
body: >
{
"term" : {
"username" : "{{_user.username}}"
"script": {
"lang": "mustache",
"source": {
"term" : {
"username" : "{{_user.username}}"
}
}
}
}

View File

@ -93,12 +93,17 @@ setup:
}
- do:
put_template:
put_script:
id: "1"
body: >
{
"term" : {
"username" : "{{_user.username}}"
"script": {
"lang": "mustache",
"source": {
"term" : {
"username" : "{{_user.username}}"
}
}
}
}

View File

@ -102,18 +102,23 @@ setup:
"Test search input mustache integration (using request template)":
- do:
put_template:
put_script:
id: "search-template"
body: {
"query" : {
"bool" : {
"must" : [
{
"term" : {
"value" : "val_{{num}}"
}
"script": {
"lang": "mustache",
"source": {
"query" : {
"bool" : {
"must" : [
{
"term" : {
"value" : "val_{{num}}"
}
}
]
}
]
}
}
}
}