Skip to content

Commit

Permalink
Add tests for GET Request
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Feb 7, 2025
1 parent 9a54a4e commit 40f2afc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ setup:
index: .readable-system-index
id: 1
refresh: true
body:
query:
match_all: { }
body: { "test": 1 }

---
"Test that .readable-system-index does not output deprecation log on search":
Expand All @@ -31,3 +29,11 @@ setup:
query:
match_all: { }
- match: { hits.total: 1 }

- do:
warnings: [ ]
headers: { "X-Opaque-Id": "get-request" }
get:
index: .readable-system-index
id: 1
- match: { _source.test: 1 }
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ setup:
index: .nonreadable-system-index
id: 1
refresh: true
body:
query:
match_all: { }
body: { "test": 1 }

---
"Test that .nonreadable-system-index does output deprecation log on search":
Expand All @@ -32,3 +30,12 @@ setup:
query:
match_all: { }
- match: { hits.total: 1 }

- do:
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"
headers: { "X-Opaque-Id": "get-request" }
get:
index: .nonreadable-system-index
id: 1
- match: { _source.test: 1 }

0 comments on commit 40f2afc

Please sign in to comment.