[TEST] move test for binary field to specific test file that sets Content-Type header explicitly
This commit is contained in:
parent
261f31f5b7
commit
dad025a6ad
|
@ -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:
|
||||
|
|
|
@ -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" }
|
||||
|
Loading…
Reference in New Issue