Skip to content

Tests ensuring the server integrity when running third-party code #40

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

Merged
merged 2 commits into from
Nov 2, 2016

Conversation

noelmarkham
Copy link
Contributor

@noelmarkham noelmarkham commented Nov 1, 2016

A small suite of tests for ensuring that the deployed docker container works, and does not leak any more information that it is needed.

I've included three simple tests:

  1. The endpoint works
  2. The endpoint recovers from someone calling System.exit
  3. The endpoint does not expose anything of interest through sys.env

If you can think of other tests, please let me know.

I've kept these tests separate from other endpoint tests in the code as this is really to make sure that the endpoint works, rather than the functionality of the endpoint itself.

--

These tests sit in their own SBT package, and are currently not run as part of any automated build. Due to Docker on Heroku being in beta and still very new, it is not possible to use Heroku's deployment pipelines with Docker yet. I think we have a few options here as to what to do with them.

  1. Run the tests when Travis is triggered to deploy a Docker container, and notify of any issues. Manual intervention to fix/rollback.
  2. Set up our own pipeline, deploying to a different staging URL, running the smoketests there and deploying to the production URL on success. Will have to be hand-rolled, but I don't think this would be much effort.

Once Heroku can deploy pipelines of Docker containers, we should definitely move over to using that.

@raulraja Thoughts? I think setting our own pipeline wouldn't take very long and I'm all for no manual intervention, but as I'd be hand-rolling this, I just wanted to see what you think before I go down this route.

Resolves #39.

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think option 1 makes sense. thanks! LGTM

@noelmarkham
Copy link
Contributor Author

Thanks, merging. FYI, I've added a line in the .travis.yml file to run these tests after a Docker deployment.

@noelmarkham noelmarkham merged commit 1fa4668 into master Nov 2, 2016
@noelmarkham noelmarkham deleted the nm-39-third-party-tests branch November 2, 2016 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests for ensuring integrity against third-party-run code
2 participants