Avoid using string 'y' in fields REST tests. (#60471)

Some yaml parsers interpret 'y' and 'yes' as the boolean 'true'.
This commit is contained in:
Julie Tibshirani 2020-07-31 09:09:17 -07:00
parent 8db896d290
commit fe1d877b69
1 changed files with 9 additions and 9 deletions

View File

@ -21,7 +21,7 @@ setup:
index: test index: test
id: 1 id: 1
body: body:
keyword: [ "x", "y" ] keyword: [ "a", "b" ]
integer_range: integer_range:
gte: 0 gte: 0
lte: 42 lte: 42
@ -39,8 +39,8 @@ setup:
- is_true: hits.hits.0._id - is_true: hits.hits.0._id
- is_true: hits.hits.0._source - is_true: hits.hits.0._source
- match: { hits.hits.0.fields.keyword.0: x } - match: { hits.hits.0.fields.keyword.0: a }
- match: { hits.hits.0.fields.keyword.1: y } - match: { hits.hits.0.fields.keyword.1: b }
- match: { hits.hits.0.fields.integer_range.0.gte: 0 } - match: { hits.hits.0.fields.integer_range.0.gte: 0 }
- match: { hits.hits.0.fields.integer_range.0.lte: 42 } - match: { hits.hits.0.fields.integer_range.0.lte: 42 }
@ -112,7 +112,7 @@ setup:
index: test index: test
id: 1 id: 1
body: body:
keyword: [ "x" ] keyword: [ "a" ]
- do: - do:
catch: bad_request catch: bad_request
@ -145,7 +145,7 @@ setup:
index: test index: test
id: 1 id: 1
body: body:
keyword: "x" keyword: "a"
integer: 42 integer: 42
- do: - do:
@ -153,7 +153,7 @@ setup:
index: test index: test
id: 2 id: 2
body: body:
keyword: "y" keyword: "b"
integer: "not an integer" integer: "not an integer"
- do: - do:
@ -192,7 +192,7 @@ setup:
id: 1 id: 1
refresh: true refresh: true
body: body:
keyword: "x" keyword: "a"
integer: 42 integer: 42
- do: - do:
@ -202,7 +202,7 @@ setup:
fields: [ keyword ] fields: [ keyword ]
_source: false _source: false
- match: { hits.hits.0.fields.keyword.0: "x" } - match: { hits.hits.0.fields.keyword.0: "a" }
- do: - do:
search: search:
@ -212,5 +212,5 @@ setup:
stored_fields: [ integer ] stored_fields: [ integer ]
_source: false _source: false
- match: { hits.hits.0.fields.keyword.0: "x" } - match: { hits.hits.0.fields.keyword.0: "a" }
- match: { hits.hits.0.fields.integer.0: 42 } - match: { hits.hits.0.fields.integer.0: 42 }