Skip to content

Commit fe1d877

Browse files
committed
Avoid using string 'y' in fields REST tests. (#60471)
Some yaml parsers interpret 'y' and 'yes' as the boolean 'true'.
1 parent 8db896d commit fe1d877

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search/330_fetch_fields.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ setup:
2121
index: test
2222
id: 1
2323
body:
24-
keyword: [ "x", "y" ]
24+
keyword: [ "a", "b" ]
2525
integer_range:
2626
gte: 0
2727
lte: 42
@@ -39,8 +39,8 @@ setup:
3939
- is_true: hits.hits.0._id
4040
- is_true: hits.hits.0._source
4141

42-
- match: { hits.hits.0.fields.keyword.0: x }
43-
- match: { hits.hits.0.fields.keyword.1: y }
42+
- match: { hits.hits.0.fields.keyword.0: a }
43+
- match: { hits.hits.0.fields.keyword.1: b }
4444

4545
- match: { hits.hits.0.fields.integer_range.0.gte: 0 }
4646
- match: { hits.hits.0.fields.integer_range.0.lte: 42 }
@@ -112,7 +112,7 @@ setup:
112112
index: test
113113
id: 1
114114
body:
115-
keyword: [ "x" ]
115+
keyword: [ "a" ]
116116

117117
- do:
118118
catch: bad_request
@@ -145,15 +145,15 @@ setup:
145145
index: test
146146
id: 1
147147
body:
148-
keyword: "x"
148+
keyword: "a"
149149
integer: 42
150150

151151
- do:
152152
index:
153153
index: test
154154
id: 2
155155
body:
156-
keyword: "y"
156+
keyword: "b"
157157
integer: "not an integer"
158158

159159
- do:
@@ -192,7 +192,7 @@ setup:
192192
id: 1
193193
refresh: true
194194
body:
195-
keyword: "x"
195+
keyword: "a"
196196
integer: 42
197197

198198
- do:
@@ -202,7 +202,7 @@ setup:
202202
fields: [ keyword ]
203203
_source: false
204204

205-
- match: { hits.hits.0.fields.keyword.0: "x" }
205+
- match: { hits.hits.0.fields.keyword.0: "a" }
206206

207207
- do:
208208
search:
@@ -212,5 +212,5 @@ setup:
212212
stored_fields: [ integer ]
213213
_source: false
214214

215-
- match: { hits.hits.0.fields.keyword.0: "x" }
215+
- match: { hits.hits.0.fields.keyword.0: "a" }
216216
- match: { hits.hits.0.fields.integer.0: 42 }

0 commit comments

Comments
 (0)