Add mocking for securitymanager environment. #11913
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a standalone wrapper around Mockito, it allows us to use
it without granting dangerous permissions to all of our code.
It just presents the same binary API, to be a drop-in replacement, wrapping all calls in AccessController.
See #11898
Let me know about naming and placement of this hack. I don't think it would change so often, only when we bump the Mockito version. It doesn't have any elasticsearch dependencies or anything like that.