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: - do:
put_template: put_script:
id: "1" id: "1"
body: > body: >
{ {
"term" : { "script": {
"username" : "{{_user.username}}" "lang": "mustache",
"source": {
"term" : {
"username" : "{{_user.username}}"
}
}
} }
} }

View File

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

View File

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