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 Docker image to run tests #121

Merged
merged 4 commits into from
Mar 7, 2021
Merged

Conversation

PierreF
Copy link
Contributor

@PierreF PierreF commented Nov 13, 2020

To run tests (which requires lots of backends), I've used Docker containers.
This PR add steps to rebuild and run test using this Docker image.

It's probably not prefect (sometime Redis cluster fail... not every run) but it allow me to run the tests.

@iegomez
Copy link
Owner

iegomez commented Nov 13, 2020

Hi, @PierreF! Thanks so much for this, I've been meaning to add something similar but never found the time. I won't be able to review it properly until next week since I won't have my dev machine during the weekend, but I'll take a look as soon as possible.

@PierreF
Copy link
Contributor Author

PierreF commented Nov 13, 2020

That's fine for me, thank for the quick reply.

If an old image is usage, not running apt-get update may cause 404 error
when trying to install packages.
This is true even if there is apt-get update in previous RUN
instruction, because the way Docker cache thing, previous RUN of apt-get
update may use cached version (which could be weeks old).
This avoid trying to access service while it still starting. This
happened with Redis cluster.
This make much easier to re-run test multiple time without avoid to wait
backends to start each time.
Copy link
Owner

@iegomez iegomez left a comment

Choose a reason for hiding this comment

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

Wait, isn't this missing sqlite3 dependency? How is it passing? 🤔

@PierreF
Copy link
Contributor Author

PierreF commented Mar 5, 2021

It's the same as base Dockerfile (just the end that change).

https://github.com/mattn/go-sqlite3 seems to bundle sqlite3 code in its repository (sqlite3-binding.c), which means sqlite3 get bundled in both source code and then in binary (static linking).

@iegomez
Copy link
Owner

iegomez commented Mar 5, 2021

Oh, interesting! TIL.

@PierreF PierreF merged commit 19315cf into iegomez:master Mar 7, 2021
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.

None yet

2 participants