You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The light way
keep a save of each updated dockerfiles and use the trap command to rollback the changes at the end of the integration-test.sh script.
The hard way
add a variable to MakefileINTEGRATION_REGISTRY valued by default to gcr.io
add the same variable to integration-test.sh valued by default to gcr.io
launch the copy from gcr.io to target if differents
either the light way or by using a build argument variable INTEGRATION_REGISTRY in each FROM command and use it in each docker 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:
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.
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: