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,14 +93,19 @@ setup:
} }
- do: - do:
put_template: put_script:
id: "1" id: "1"
body: > body: >
{ {
"script": {
"lang": "mustache",
"source": {
"term" : { "term" : {
"username" : "{{_user.username}}" "username" : "{{_user.username}}"
} }
} }
}
}
- do: - do:
index: index:

View File

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

View File

@ -102,9 +102,12 @@ 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: {
"script": {
"lang": "mustache",
"source": {
"query" : { "query" : {
"bool" : { "bool" : {
"must" : [ "must" : [
@ -117,6 +120,8 @@ setup:
} }
} }
} }
}
}
- match: { acknowledged: true } - match: { acknowledged: true }
- do: - do: