Skip to content

Commit

Permalink
Convert 'routing' values in REST API tests to strings (elastic#77249)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
sethmlarson and elasticmachine authored Sep 3, 2021
1 parent 9f34099 commit 029ea4a
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setup:
index:
index: test
id: 2
routing: 1
routing: "1"
body: {"bar": "baz", "join_field": { "name" : "child", "parent": "1"} }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ setup:
index:
index: test
id: 2
routing: 1
routing: "1"
body: { "join_field": { "name": "answer", "parent": 1} , "entity_type": "answer" }

- do:
Expand All @@ -37,7 +37,7 @@ setup:
- do:
index:
index: test
routing: 3
routing: "3"
id: 4
body: { "join_field": { "name": "address", "parent": 3 }, "entity_type": "address" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ setup:
index:
index: source
id: 2
routing: 1
routing: "1"
body: { "join_field": { "name": "child", "parent": "1" } }

- do:
index:
index: source
id: 3
routing: 1
routing: "1"
body: { "join_field": { "name": "grand_child", "parent": "2" } }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
create:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
get:
index: test_1
id: 1
routing: 5
routing: "5"
stored_fields: [_routing]

- match: { _id: "1"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
index:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
catch: missing
delete:
index: test_1
id: 1
routing: 4
routing: "4"

- do:
delete:
index: test_1
id: 1
routing: 5
routing: "5"

Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
index:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
exists:
index: test_1
id: 1
routing: 5
routing: "5"

- is_true: ''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
index:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
get:
index: test_1
id: 1
routing: 5
routing: "5"
stored_fields: [_routing]

- match: { _id: "1"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
index:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
get_source:
index: test_1
id: 1
routing: 5
routing: "5"

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
index:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
get:
index: test_1
id: 1
routing: 5
routing: "5"
stored_fields: [_routing]

- match: { _id: "1"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ setup:
- add:
index: test_index
alias: test_alias
routing: 5
routing: "5"

- do:
indices.get_alias:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
index:
index: test_1
id: 1
routing: 5
routing: "5"
body: { foo: bar }

- do:
Expand All @@ -32,8 +32,8 @@
body:
docs:
- { _id: 1 }
- { _id: 1, routing: 4 }
- { _id: 1, routing: 5 }
- { _id: 1, routing: "4" }
- { _id: 1, routing: "5" }

- is_false: docs.0.found
- is_false: docs.1.found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,23 +719,23 @@ setup:
refresh: true
index: test_1
id: 1
routing: 1
routing: "1"
body: { "str": "abc" }

- do:
index:
refresh: true
index: test_1
id: 2
routing: 1
routing: "1"
body: { "str": "abc" }

- do:
index:
refresh: true
index: test_1
id: 3
routing: 1
routing: "1"
body: { "str": "bcd" }

- do:
Expand Down Expand Up @@ -769,23 +769,23 @@ setup:
refresh: true
index: test_1
id: 1
routing: 1
routing: "1"
body: { "str": "abc" }

- do:
index:
refresh: true
index: test_1
id: 2
routing: 1
routing: "1"
body: { "str": "abc" }

- do:
index:
refresh: true
index: test_1
id: 3
routing: 1
routing: "1"
body: { "str": "bcd" }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
update:
index: test_1
id: 1
routing: 5
routing: "5"
body:
doc: { foo: baz }
upsert: { foo: bar }
Expand All @@ -32,7 +32,7 @@
get:
index: test_1
id: 1
routing: 5
routing: "5"
stored_fields: _routing

- match: { _routing: "5"}
Expand All @@ -49,7 +49,7 @@
update:
index: test_1
id: 1
routing: 5
routing: "5"
_source: foo
body:
doc: { foo: baz }
Expand Down

0 comments on commit 029ea4a

Please sign in to comment.