Skip to content

Commit 029ea4a

Browse files
Convert 'routing' values in REST API tests to strings (#77249)
Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
1 parent 9f34099 commit 029ea4a

File tree

13 files changed

+31
-31
lines changed

13 files changed

+31
-31
lines changed

modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/11_parent_child.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ setup:
2020
index:
2121
index: test
2222
id: 2
23-
routing: 1
23+
routing: "1"
2424
body: {"bar": "baz", "join_field": { "name" : "child", "parent": "1"} }
2525

2626
- do:

modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/30_inner_hits.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ setup:
2525
index:
2626
index: test
2727
id: 2
28-
routing: 1
28+
routing: "1"
2929
body: { "join_field": { "name": "answer", "parent": 1} , "entity_type": "answer" }
3030

3131
- do:
@@ -37,7 +37,7 @@ setup:
3737
- do:
3838
index:
3939
index: test
40-
routing: 3
40+
routing: "3"
4141
id: 4
4242
body: { "join_field": { "name": "address", "parent": 3 }, "entity_type": "address" }
4343

modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ setup:
2525
index:
2626
index: source
2727
id: 2
28-
routing: 1
28+
routing: "1"
2929
body: { "join_field": { "name": "child", "parent": "1" } }
3030

3131
- do:
3232
index:
3333
index: source
3434
id: 3
35-
routing: 1
35+
routing: "1"
3636
body: { "join_field": { "name": "grand_child", "parent": "2" } }
3737

3838
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/create/40_routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
create:
2222
index: test_1
2323
id: 1
24-
routing: 5
24+
routing: "5"
2525
body: { foo: bar }
2626

2727
- do:
2828
get:
2929
index: test_1
3030
id: 1
31-
routing: 5
31+
routing: "5"
3232
stored_fields: [_routing]
3333

3434
- match: { _id: "1"}

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/delete/30_routing.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
index:
1616
index: test_1
1717
id: 1
18-
routing: 5
18+
routing: "5"
1919
body: { foo: bar }
2020

2121
- do:
2222
catch: missing
2323
delete:
2424
index: test_1
2525
id: 1
26-
routing: 4
26+
routing: "4"
2727

2828
- do:
2929
delete:
3030
index: test_1
3131
id: 1
32-
routing: 5
32+
routing: "5"
3333

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/exists/40_routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
index:
2323
index: test_1
2424
id: 1
25-
routing: 5
25+
routing: "5"
2626
body: { foo: bar }
2727

2828
- do:
2929
exists:
3030
index: test_1
3131
id: 1
32-
routing: 5
32+
routing: "5"
3333

3434
- is_true: ''
3535

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/get/40_routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
index:
2424
index: test_1
2525
id: 1
26-
routing: 5
26+
routing: "5"
2727
body: { foo: bar }
2828

2929
- do:
3030
get:
3131
index: test_1
3232
id: 1
33-
routing: 5
33+
routing: "5"
3434
stored_fields: [_routing]
3535

3636
- match: { _id: "1"}

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/get_source/40_routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
index:
2525
index: test_1
2626
id: 1
27-
routing: 5
27+
routing: "5"
2828
body: { foo: bar }
2929

3030
- do:
3131
get_source:
3232
index: test_1
3333
id: 1
34-
routing: 5
34+
routing: "5"
3535

3636
- match: { '': {foo: bar}}
3737

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/index/40_routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
index:
2323
index: test_1
2424
id: 1
25-
routing: 5
25+
routing: "5"
2626
body: { foo: bar }
2727

2828
- do:
2929
get:
3030
index: test_1
3131
id: 1
32-
routing: 5
32+
routing: "5"
3333
stored_fields: [_routing]
3434

3535
- match: { _id: "1"}

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.update_aliases/20_routing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ setup:
125125
- add:
126126
index: test_index
127127
alias: test_alias
128-
routing: 5
128+
routing: "5"
129129

130130
- do:
131131
indices.get_alias:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mget/40_routing.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
index:
2323
index: test_1
2424
id: 1
25-
routing: 5
25+
routing: "5"
2626
body: { foo: bar }
2727

2828
- do:
@@ -32,8 +32,8 @@
3232
body:
3333
docs:
3434
- { _id: 1 }
35-
- { _id: 1, routing: 4 }
36-
- { _id: 1, routing: 5 }
35+
- { _id: 1, routing: "4" }
36+
- { _id: 1, routing: "5" }
3737

3838
- is_false: docs.0.found
3939
- is_false: docs.1.found

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation/20_terms.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -719,23 +719,23 @@ setup:
719719
refresh: true
720720
index: test_1
721721
id: 1
722-
routing: 1
722+
routing: "1"
723723
body: { "str": "abc" }
724724

725725
- do:
726726
index:
727727
refresh: true
728728
index: test_1
729729
id: 2
730-
routing: 1
730+
routing: "1"
731731
body: { "str": "abc" }
732732

733733
- do:
734734
index:
735735
refresh: true
736736
index: test_1
737737
id: 3
738-
routing: 1
738+
routing: "1"
739739
body: { "str": "bcd" }
740740

741741
- do:
@@ -769,23 +769,23 @@ setup:
769769
refresh: true
770770
index: test_1
771771
id: 1
772-
routing: 1
772+
routing: "1"
773773
body: { "str": "abc" }
774774

775775
- do:
776776
index:
777777
refresh: true
778778
index: test_1
779779
id: 2
780-
routing: 1
780+
routing: "1"
781781
body: { "str": "abc" }
782782

783783
- do:
784784
index:
785785
refresh: true
786786
index: test_1
787787
id: 3
788-
routing: 1
788+
routing: "1"
789789
body: { "str": "bcd" }
790790

791791
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/update/40_routing.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
update:
2424
index: test_1
2525
id: 1
26-
routing: 5
26+
routing: "5"
2727
body:
2828
doc: { foo: baz }
2929
upsert: { foo: bar }
@@ -32,7 +32,7 @@
3232
get:
3333
index: test_1
3434
id: 1
35-
routing: 5
35+
routing: "5"
3636
stored_fields: _routing
3737

3838
- match: { _routing: "5"}
@@ -49,7 +49,7 @@
4949
update:
5050
index: test_1
5151
id: 1
52-
routing: 5
52+
routing: "5"
5353
_source: foo
5454
body:
5555
doc: { foo: baz }

0 commit comments

Comments
 (0)