-
Notifications
You must be signed in to change notification settings - Fork 80
Support filterBy in update/delete destination/monitor APIs #311
Conversation
Codecov Report
@@ Coverage Diff @@
## master #311 +/- ##
============================================
- Coverage 80.06% 79.27% -0.80%
- Complexity 199 202 +3
============================================
Files 151 151
Lines 5198 5322 +124
Branches 682 701 +19
============================================
+ Hits 4162 4219 +57
- Misses 674 728 +54
- Partials 362 375 +13 Continue to review full report at Codecov.
|
.../com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexDestinationAction.kt
Outdated
Show resolved
Hide resolved
...tlin/com/amazon/opendistroforelasticsearch/alerting/transport/TransportIndexMonitorAction.kt
Outdated
Show resolved
Hide resolved
|
||
val updatedDestination = updateDestination(destination = destinationV2) | ||
assertEquals("Incorrect destination name", updatedDestination.name, "testUpdate") | ||
assertEquals("Incorrect destination type", updatedDestination.type, DestinationType.SLACK) |
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 am wondering the use case for this filterBy feature: another user B with different backend role compared to user A who create the destination, when fillterBy enabled, user B will not be able to update the the destination, even user B has the permission for update destination API
reason to ask is I am expecting to see some test like that here
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.
Yes, we will be adding those. Sriram modified the testing framework in this PR, so it will be easy to add a different user to test this use case. I have tested this manually for now.
c205b5f
* Support filterBy in update/delete destination/monitor APIs * cleanup code * fix message * add comments to checkUserFilterByPermissions function
Issue #, if available:
#310
Description of changes:
Support filterBy in update/delete destination/monitor APIs
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.