forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Craig Perkins <[email protected]>
- Loading branch information
Showing
4 changed files
with
95 additions
and
12 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
33 changes: 33 additions & 0 deletions
33
...er/src/yamlRestTest/resources/rest-api-spec/test/resthandler/30_readable_system_index.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,33 @@ | ||
--- | ||
setup: | ||
- skip: | ||
features: allowed_warnings | ||
- do: | ||
indices.create: | ||
index: .readable-system-index | ||
|
||
- do: | ||
allowed_warnings: | ||
- "this request accesses system indices: [.readable-system-index], but in a future major version, direct access to system indices will be prevented by default" | ||
index: | ||
index: .readable-system-index | ||
id: 1 | ||
refresh: true | ||
body: | ||
query: | ||
match_all: { } | ||
|
||
--- | ||
"Test that .readable-system-index does not output deprecation log on search": | ||
- skip: | ||
features: [warnings, headers] | ||
- do: | ||
warnings: [] | ||
headers: { "X-Opaque-Id": "search-request" } | ||
search: | ||
rest_total_hits_as_int: true | ||
index: .readable-system-index | ||
body: | ||
query: | ||
match_all: { } | ||
- match: { hits.total: 1 } |
34 changes: 34 additions & 0 deletions
34
...src/yamlRestTest/resources/rest-api-spec/test/resthandler/40_nonreadable_system_index.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,34 @@ | ||
--- | ||
setup: | ||
- skip: | ||
features: allowed_warnings | ||
- do: | ||
indices.create: | ||
index: .nonreadable-system-index | ||
|
||
- do: | ||
allowed_warnings: | ||
- "this request accesses system indices: [.nonreadable-system-index], but in a future major version, direct access to system indices will be prevented by default" | ||
index: | ||
index: .nonreadable-system-index | ||
id: 1 | ||
refresh: true | ||
body: | ||
query: | ||
match_all: { } | ||
|
||
--- | ||
"Test that .nonreadable-system-index does output deprecation log on search": | ||
- skip: | ||
features: [warnings, headers] | ||
- do: | ||
headers: { "X-Opaque-Id": "search-request" } | ||
warnings: | ||
- "this request accesses system indices: [.nonreadable-system-index], but in a future major version, direct access to system indices will be prevented by default" | ||
search: | ||
rest_total_hits_as_int: true | ||
index: .nonreadable-system-index | ||
body: | ||
query: | ||
match_all: { } | ||
- match: { hits.total: 1 } |
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