-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fix for: Admin Users must be able to access all monitors #139 #280
Bug fix for: Admin Users must be able to access all monitors #139 #280
Conversation
emptyMap(), | ||
NStringEntity(search, ContentType.APPLICATION_JSON) | ||
) | ||
assertEquals("Get monitor failed", RestStatus.OK, adminGetResponse.restStatus()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a more descriptive error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is fine since its is part of the assertion failure which would mean the request failed to get the monitor
@@ -509,6 +509,25 @@ class SecureMonitorRestApiIT : AlertingRestTestCase() { | |||
) | |||
assertEquals("Search monitor failed", RestStatus.OK, adminSearchResponse.restStatus()) | |||
assertEquals("Monitor not found during search", 1, getDocs(adminSearchResponse)) | |||
|
|||
// get as "admin" - must get 1 docs | |||
val id: String = monitorJson["_id"] as String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add assertion check for ID?
…rch-project#139 Signed-off-by: skkosuri-amzn <skkosuri@amazon.com>
be6696e
to
cb6f449
Compare
Codecov Report
@@ Coverage Diff @@
## main #280 +/- ##
=========================================
Coverage 78.63% 78.63%
+ Complexity 218 217 -1
=========================================
Files 173 173
Lines 6968 6970 +2
Branches 915 916 +1
=========================================
+ Hits 5479 5481 +2
+ Misses 1002 1001 -1
- Partials 487 488 +1
Continue to review full report at Codecov.
|
…rch-project#139 (opensearch-project#280) Signed-off-by: skkosuri-amzn <skkosuri@amazon.com>
…rch-project#139 (opensearch-project#280) Signed-off-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com>
…rch-project#139 (opensearch-project#280) Signed-off-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com>
…rch-project#139 (opensearch-project#280) Signed-off-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com> Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Issue #, if available:
Bug fix for: Admin Users must be able to access all monitors #139
Description of changes:
Fix GET /monitor DELETE /monitor when
plugins.alerting.filter_by_backend_roles : true
CheckList:
[X] Commits are signed per the DCO using --signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.