-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 documentation about local integration tests #1012
Comments
Thanks @antechrestos for bringing this up! We want to make development experience better for all our open source contributors. |
All good points! I wasn't expecting there to be any demand outside of travis CI to run integration tests locally, but since there clearly is we should get it fixed. Actually the best way would be to fix the google-go-container-registry to not require authentication with gcloud for public GCR repositories. The only reason I made this hacky solution that replaces the base image with local docker registry was due to that bug. However if you wish to do it. I think the easiest and best solution for now would be to just not use GCR anywhere in the integration tests. |
I created a bug to go-containerregistry here: google/go-containerregistry#666 |
Looking at the travis file, we can see that there is a way to run integration tests locally. This great feature was brought by the following pull request
I think this feature quite great and should be documented as it is quite usefull.
However, looking at how it is done, I found the script that updates the integration docker files and copies the base image from gcr.io to local registry.
If any developer did it on its laptop, it would end with git modified file which is annoying.
It can be solved in several way
keep a save of each updated dockerfiles and use the
trap
command to rollback the changes at the end of theintegration-test.sh
script.Makefile
INTEGRATION_REGISTRY
valued by default togcr.io
integration-test.sh
valued by default togcr.io
gcr.io
to target if differentsINTEGRATION_REGISTRY
in eachFROM
command and use it in eachdocker
command launched by tests.I would be glad to implement any chosen solution, even a third one 😄
The text was updated successfully, but these errors were encountered: