Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes typed calls from YAML REST tests #37611

Merged
merged 18 commits into from
Jan 30, 2019
Merged
Prev Previous commit
Next Next commit
review comments
  • Loading branch information
colings86 committed Jan 30, 2019
commit 7ab3edc550900300cd6c93c7b64c47ee298f2d0d
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
id: 1

- match: { _index: smb-test }
- match: { _type: doc }
- match: { _type: _doc }
- match: { _id: "1"}
- match: { _version: 1}
- match: { _source: { foo: bar }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ setup:

- do:
indices.create:
include_type_name: false
index: test_index
body:
aliases:
test_alias: {}
test_blias: {}
mappings:
type_1: {}
properties:
foo:
type: keyword
settings:
number_of_shards: 1
number_of_replicas: 1
Expand Down Expand Up @@ -52,41 +55,6 @@ setup:
- is_true: test_index.settings
- is_true: test_index.mappings

---
"Test include_type_name":
- skip:
version: " - 6.6.99"
reason: the include_type_name parameter is not supported before 6.7

- do:
indices.get:
include_type_name: true
index: test_index

- is_true: test_index.mappings
- is_true: test_index.mappings.type_1

- do:
indices.get:
include_type_name: false
index: test_index

- is_true: test_index.mappings
- is_false: test_index.mappings.type_1

---
"Test include_type_name dafaults to false":
- skip:
version: " - 6.99.99"
reason: the include_type_name parameter default is different on 6.x and 7.0, so only test this on 7.0 clusters

- do:
indices.get:
index: test_index

- is_true: test_index.mappings
- is_false: test_index.mappings.type_1

---
"Get index infos should work for wildcards":

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
colings86 marked this conversation as resolved.
Show resolved Hide resolved
setup:

- do:
indices.create:
index: test_index
body:
aliases:
test_alias: {}
test_blias: {}
mappings:
type_1: {}
settings:
number_of_shards: 1
number_of_replicas: 1

- do:
indices.create:
index: test_index_2
body:
settings:
number_of_shards: 1
number_of_replicas: 2
aliases:
test_alias: {}
test_blias: {}

- do:
indices.create:
index: test_index_3
body:
aliases:
test_alias: {}
test_blias: {}

- do:
indices.close:
index: test_index_3

- do:
cluster.health:
wait_for_status: yellow

---
"Test include_type_name":
- skip:
version: " - 6.6.99"
reason: the include_type_name parameter is not supported before 6.7

- do:
indices.get:
include_type_name: true
index: test_index

- is_true: test_index.mappings
- is_true: test_index.mappings.type_1

- do:
indices.get:
include_type_name: false
index: test_index

- is_true: test_index.mappings
- is_false: test_index.mappings.type_1

---
"Test include_type_name dafaults to false":
- skip:
version: " - 6.99.99"
reason: the include_type_name parameter default is different on 6.x and 7.0, so only test this on 7.0 clusters

- do:
indices.get:
index: test_index

- is_true: test_index.mappings
- is_false: test_index.mappings.type_1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- do:
indices.create:
include_type_name: true
index: test_index
body:
mappings:
Expand All @@ -19,4 +20,3 @@
index: test_index
type: not_test_type
fields: text

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"Non-existent type returns 404":
- do:
indices.create:
include_type_name: true
index: test_index
body:
mappings:
Expand Down Expand Up @@ -100,4 +101,3 @@
indices.get_mapping:
include_type_name: true
type: not_test_type

Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,3 @@ setup:

- match: { _all.primaries.indexing.types.bar.index_total: 1 }
- is_false: _all.primaries.indexing.types.baz