mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-27 10:28:28 +00:00
We support `"""` in `console` snippets to emulate kibana's CONSOLE. CONSOLE also spits out `"""` when a json field contains a new line or a double quote. This adds support for those sorts of responses to the handling of `console-response` snippets.
This commit is contained in:
parent
b814d10063
commit
c3e07da437
@ -298,7 +298,9 @@ class RestTestsFromSnippetsTask extends SnippetsTask {
|
||||
if (null == response.skip) {
|
||||
current.println(" - match: ")
|
||||
current.println(" \$body: ")
|
||||
response.contents.eachLine { current.println(" $it") }
|
||||
replaceBlockQuote(response.contents).eachLine {
|
||||
current.println(" $it")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ The API returns the following result:
|
||||
{
|
||||
"script" : {
|
||||
"lang" : "mustache",
|
||||
"source" : "{\"query\":{\"match\":{\"title\":\"{{query_string}}\"}}}",
|
||||
"source" : """{"query":{"match":{"title":"{{query_string}}"}}}""",
|
||||
"options": {
|
||||
"content_type" : "application/json; charset=UTF-8"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user