Skip to content
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

Add mocking for securitymanager environment. #11913

Merged
merged 2 commits into from Jun 29, 2015
Merged

Conversation

rmuir
Copy link
Contributor

@rmuir rmuir commented Jun 29, 2015

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.

This is a standalone wrapper around Mockito, it allows us to use
it without granting dangerous permissions to all of our code.

See https://github.com/rmuir/securemock
@s1monw
Copy link
Contributor

s1monw commented Jun 29, 2015

LGTM

@clintongormley clintongormley added the >test Issues or PRs that are addressing/adding tests label Jun 29, 2015
rmuir added a commit that referenced this pull request Jun 29, 2015
Add mocking for securitymanager environment.
@rmuir rmuir merged commit bf87f3a into elastic:master Jun 29, 2015
@nik9000
Copy link
Member

nik9000 commented Jun 29, 2015

Is this something you can upstream?

@rmuir
Copy link
Contributor Author

rmuir commented Jun 29, 2015

Maybe, one issue is that it would be a risk, if you used this in a production (non-test) environment. Personally I think thats stupid, but I see the argument of someone accidentally leaving it in classpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants