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

Write end-to-end tests for mybinder.org #10

Closed
yuvipanda opened this issue Sep 28, 2017 · 5 comments
Closed

Write end-to-end tests for mybinder.org #10

yuvipanda opened this issue Sep 28, 2017 · 5 comments

Comments

@yuvipanda
Copy link
Contributor

These should exercise common pathways that real users do, and should be fast enough to be used as part of each and every deployment automatically.

Things it should test:

  1. A repo requiring new image building is ok
  2. A repo that launches an image that is already built is also ok
  3. Users can connect to the notebook after launching
@yuvipanda
Copy link
Contributor Author

There's one now that tests (2) and (3) under tests/ in this repo. I'm just structuring them as pytest tests, which is great!

@minrk
Copy link
Member

minrk commented Oct 2, 2017

For 1. to get maximum realistic test, is it possible to delete the image for the test repo prior to requesting the build? Does the test env have sufficient permission to do that?

@yuvipanda
Copy link
Contributor Author

@minrk yeah, technically it can do that - since we already have the service account key for gcr.io login in config/secret/common.yaml. I guess we could just use that and do a delete before building. But I'm unsure how we can make that idempotent tho - if two intsances of this test are running at the same time, they'll trample each other.

Another possibility is we have a github repository that we make a new commit to each time we do this. We push it into a new branch, do the build, verify it works, then remove the branch. This will be much more idempotent test that trying to whitebox our way into deleting the image. What do you think?

@minrk
Copy link
Member

minrk commented Oct 5, 2017

@yuvipanda a dedicated test repo that we push trivial commits to (e.g. date > file) sounds like the best option.

@yuvipanda
Copy link
Contributor Author

@minrk I've created an org (https://github.com/binderhub-ci-repos) for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants