Skip to content

Commit 13b5062

Browse files
committed
Skip bad request REST test on pre-6.0
This commit adds a skip for the bad request REST test on pre-6.0 nodes. Previously, a request for /_(.*) where $1 is not an existing endpoint would return a 404. This is because the request would be treated as a get index request for an index named _$1. However, an index can never start with "_" so logic was added to detect this and return a 400 instead as this should be treated as a bad request. During the mixed-cluster BWC tests, a node running pre-6.0 code will still return a 404 though. Therefore, this test needs to skipped in such a mixed-cluster scenario.
1 parent 2b98a6d commit 13b5062

File tree

1 file changed

+3
-0
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/indices.get

1 file changed

+3
-0
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ setup:
162162

163163
---
164164
"Should return an exception when querying invalid indices":
165+
- skip:
166+
version: " - 5.99.99"
167+
reason: "bad request logic added in 6.0.0"
165168

166169
- do:
167170
catch: bad_request

0 commit comments

Comments
 (0)