From dad025a6ad1e9f66899211a1cb5a615aac7078fd Mon Sep 17 00:00:00 2001 From: javanna Date: Mon, 20 Feb 2017 12:17:30 +0100 Subject: [PATCH] [TEST] move test for binary field to specific test file that sets Content-Type header explicitly --- .../test/painless/50_script_doc_values.yaml | 24 ---------- .../painless/60_script_doc_values_binary.yaml | 47 +++++++++++++++++++ 2 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yaml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yaml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yaml index cff58c01e12..3e80e5026dc 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yaml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yaml @@ -6,9 +6,6 @@ setup: mappings: test: properties: - binary: - type: binary - doc_values: true boolean: type: boolean date: @@ -46,7 +43,6 @@ setup: type: test id: 1 body: - binary: U29tZSBiaW5hcnkgYmxvYg== boolean: true date: 2017-01-01T12:11:12 geo_point: 41.12,-71.34 @@ -65,26 +61,6 @@ setup: - do: indices.refresh: {} ---- -"binary": - - do: - search: - body: - script_fields: - field: - script: - inline: "doc['binary'].get(0).utf8ToString()" - - match: { hits.hits.0.fields.field.0: "Some binary blob" } - - - do: - search: - body: - script_fields: - field: - script: - inline: "doc['binary'].value.utf8ToString()" - - match: { hits.hits.0.fields.field.0: "Some binary blob" } - --- "boolean": - do: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yaml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yaml new file mode 100644 index 00000000000..9a118830808 --- /dev/null +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yaml @@ -0,0 +1,47 @@ +--- +"binary": + - skip: + features: ["headers"] + - do: + indices.create: + index: test + body: + mappings: + test: + properties: + binary: + type: binary + doc_values: true + + - do: + #set the header so we won't randomize it + headers: + Content-Type: application/json + index: + index: test + type: test + id: 1 + body: + binary: U29tZSBiaW5hcnkgYmxvYg== + + - do: + indices.refresh: {} + + - do: + search: + body: + script_fields: + field: + script: + inline: "doc['binary'].get(0).utf8ToString()" + - match: { hits.hits.0.fields.field.0: "Some binary blob" } + + - do: + search: + body: + script_fields: + field: + script: + inline: "doc['binary'].value.utf8ToString()" + - match: { hits.hits.0.fields.field.0: "Some binary blob" } +