Skip to content

Commit

Permalink
Remove useless version checks in REST tests. (#30165)
Browse files Browse the repository at this point in the history
Many tests are added with a version check so that they do not run against a
version that doesn't have the feature yet. Master is 7.0, so all tests that
do not run against 6.0+ can be removed and the version check can be removed
on all tests that always run on 6.0+.
  • Loading branch information
jpountz authored May 2, 2018
1 parent 7358946 commit 231a63f
Show file tree
Hide file tree
Showing 74 changed files with 4 additions and 734 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"Custom normalizer with illegal filter in request":
# Tests analyze api with normalizer. This is in the analysis-common module
# because there are no filters that support multiTermAware
- skip:
version: " - 5.99.99"
reason: normalizer support in 6.0.0
- do:
catch: bad_request
indices.analyze:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"Synonym filter with char_filter":
# Tests analyze with synonym and char_filter. This is in the analysis-common module
# because there are no char filters in core.
- skip:
version: " - 5.99.99"
reason: to support synonym same analysis chain were added in 6.0.0
- do:
indices.create:
index: test_synonym_with_charfilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ setup:

---
"Parent/child inner hits":
- skip:
version: " - 5.5.99"
reason: parent-join was added in 5.6.

- do:
index:
index: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ setup:

---
"Test basic":
- skip:
version: " - 5.5.99"
reason: parent-join was added in 5.6

- do:
search:
body: { sort: ["join_field", "_id"] }
Expand Down Expand Up @@ -104,10 +100,6 @@ setup:

---
"Test parent_id query":
- skip:
version: " - 5.5.99"
reason: parent-join was added in 5.6.

- do:
search:
body:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
---
"no query fails":

- skip:
version: " - 5.99.99"
reason: explicit query is required since 6.0.0

- do:
catch: /query is missing/
delete_by_query:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
"Get simple field caps from remote cluster":
- skip:
version: " - 5.4.99"
reason: this uses a new API functionality that has been added in 5.5.0

- do:
indices.create:
index: field_caps_index_2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@

---
"Empty _id":
- skip:
version: " - 5.3.0"
reason: empty IDs were not rejected until 5.3.1
- do:
bulk:
refresh: true
Expand Down Expand Up @@ -62,11 +59,6 @@
---
"empty action":

- skip:
version: " - 5.4.99"
reason: confusing exception messaged caused by empty object fixed in 5.5.0
features: ["headers"]

- do:
catch: /Malformed action\/metadata line \[3\], expected FIELD_NAME but found \[END_OBJECT\]/
headers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@
---
"Multiple alias names":

- skip:
version: " - 5.99.99"
reason: multiple aliases are supported only from 6.0.0 on

- do:
indices.create:
index: test
Expand Down Expand Up @@ -265,10 +261,6 @@
---
"Alias sorting":

- skip:
version: " - 5.0.99"
reason: sorting was introduced in 5.1.0

- do:
indices.create:
index: test_index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@
---
"Test cat indices sort":
- skip:
version: " - 5.0.99"
reason: sorting was introduced in 5.1.0

- do:
indices.create:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
---
"Additional disk information":
- skip:
version: " - 5.5.99"
reason: additional disk info added in 5.6.0

- do:
cat.nodes:
h: diskAvail,diskTotal,diskUsed,diskUsedPercent
Expand Down Expand Up @@ -92,10 +88,6 @@
---
"Test cat nodes output with full_id set":
- skip:
version: " - 5.0.0"
reason: The full_id setting was rejected in 5.0.0 see #21266


- do:
cat.nodes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
---
"Test cat repositories sort":
- skip:
version: " - 5.0.99"
reason: sorting was introduced in 5.1.0
- do:
snapshot.create_repository:
repository: test_cat_repo_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@
---
"Test cat segments on closed index behaviour":

- skip:
version: " - 5.99.99"
reason: status code on closed indices changed in 6.0.0 from 403 to 400

- do:
indices.create:
index: index1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
"Help":
- skip:
version: " - 5.99.99"
reason: seq no stats were added in 6.0.0

- do:
cat.shards:
Expand Down Expand Up @@ -219,10 +216,6 @@
---
"Test cat shards sort":
- skip:
version: " - 5.0.99"
reason: sorting was introduced in 5.1.0

- do:
indices.create:
index: foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
"Help":
- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0
- do:
cat.templates:
help: true
Expand All @@ -17,9 +14,6 @@
---
"No templates":
- skip:
version: " - 5.0.99"
reason: templates were introduced in 5.1.0
- do:
cat.templates: {}

Expand All @@ -31,10 +25,6 @@
---
"Normal templates":

- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0

- do:
indices.put_template:
name: test
Expand Down Expand Up @@ -83,10 +73,6 @@
---
"Filtered templates":

- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0

- do:
indices.put_template:
name: test
Expand Down Expand Up @@ -125,9 +111,6 @@
---
"Column headers":
- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0
- do:
indices.put_template:
name: test
Expand Down Expand Up @@ -161,9 +144,6 @@
---
"Select columns":
- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0
- do:
indices.put_template:
name: test
Expand Down Expand Up @@ -194,9 +174,6 @@
---
"Sort templates":
- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0
- do:
indices.put_template:
name: test
Expand Down Expand Up @@ -245,9 +222,6 @@
---
"Multiple template":
- skip:
version: " - 5.99.99"
reason: this uses a new API that has been added in 6.0
- do:
indices.put_template:
name: test_1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
"bad cluster shard allocation explanation request":
- skip:
version: " - 5.5.99"
reason: response status on bad request was changed starting in 5.6.0

- do:
# there aren't any unassigned shards to explain
catch: /illegal_argument_exception/
cluster.allocation_explain: {}

---
"cluster shard allocation explanation test":
- skip:
version: " - 5.1.99"
reason: explain API response output was changed starting in 5.2.0

- do:
indices.create:
index: test
Expand All @@ -40,10 +32,6 @@

---
"cluster shard allocation explanation test with empty request":
- skip:
version: " - 5.1.99"
reason: explain API response output was changed starting in 5.2.0

- do:
indices.create:
index: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@
---
"Test get a default settings":

# this can't be bumped to 5.0.2 until snapshots are published
- skip:
version: " - 5.0.3"
reason: Fetching default group setting was buggy until 5.0.3

- do:
cluster.get_settings:
include_defaults: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
"Get an empty remote info":
- skip:
version: " - 5.3.99"
reason: this API doesn't exist in 5.3.x yet
- do:
cluster.remote_info: {}
- is_true: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

---
"get cluster state returns cluster state size with human readable format":
- skip:
version: " - 5.99.99"
reason: "cluster state size is only available in v6.0.0 and higher"

- do:
cluster.state:
human: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
---
"Internal versioning with explicit version":

- skip:
version: " - 5.1.1"
reason: validation logic only fixed from 5.1.2 onwards

- do:
catch: bad_request
create:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
"External version":

- skip:
version: " - 5.1.1"
reason: validation logic only fixed from 5.1.2 onwards

- do:
catch: bad_request
create:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ setup:

---
"Get simple field caps":
- skip:
version: " - 5.3.99"
reason: this uses a new API that has been added in 5.4.0

- do:
field_caps:
Expand Down Expand Up @@ -116,9 +113,6 @@ setup:
- is_false: fields.geo.keyword.on_aggregatable_indices
---
"Get nested field caps":
- skip:
version: " - 5.3.99"
reason: this uses a new API that has been added in 5.4.0

- do:
field_caps:
Expand Down Expand Up @@ -147,9 +141,6 @@ setup:
- is_false: fields.object\.nested2.keyword.non_searchable_indices
---
"Get prefix field caps":
- skip:
version: " - 5.3.99"
reason: this uses a new API that has been added in 5.4.0

- do:
field_caps:
Expand All @@ -168,9 +159,6 @@ setup:

---
"Mix in non-existing field field caps":
- skip:
version: " - 5.4.0"
reason: "#24504 fixed a bug in this API in 5.4.1"

- do:
field_caps:
Expand Down
Loading

0 comments on commit 231a63f

Please sign in to comment.