-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REST API compatibility] special handling for _freeze (#79861)
- Loading branch information
Showing
3 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...gin/src/yamlRestTestV7Compat/resources/rest-api-spec/test/freeze.gone/10_basic_compat.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
setup: | ||
- skip: | ||
version: "9.0.0 - " | ||
reason: "compatible from 8.x to 7.x" | ||
features: | ||
- "headers" | ||
- "warnings_regex" | ||
- do: | ||
index: | ||
index: some-test-index-1 | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
--- | ||
"Freezing a non-existent index throws 404": | ||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
indices.freeze: | ||
index: some-test-index-404 | ||
catch: missing | ||
|
||
--- | ||
"Freezing an index throws 410": | ||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
indices.freeze: | ||
index: some-test-index-1 | ||
catch: /It is no longer possible to freeze indices, but existing frozen indices can still be unfrozen/ | ||
|
||
--- | ||
"Without compat headers throws 400": | ||
- do: | ||
indices.freeze: | ||
index: some-test-index-1 | ||
catch: /no handler found for uri/ |