-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Integration tests for docker-compose #281
Comments
I would love to work on this issue, would you please just guide me to what should i do? |
The rest of the tests are running in Docker in Circle, but since these would be testing that the docker-compose setup itself works (and everything running in Docker works together), you'll probably want to use a VM executor: https://circleci.com/docs/2.0/executor-types/ An initial test could probably be as simple as:
Related, once #204 is in, we should figure out if there's a good way to test that, too. Maybe microk8s + an extra Postgres pod? |
After some digginig, I guess, I could use remote docker command for the same |
Yep, those docs are a better example than the link I found, especially the last example. If building the containers fails CI should fail, but I think maybe that should be a separate step, since building containers to push to Docker Hub for production deployment is different than spinning up docker-compose and making sure everything can still talk to everything else. |
Yeah, we want two things really:
|
Also @nveenjain thank you for coming by and pitching in! |
@toddself do you have Circle access? |
@zacanger I can give it a shot in the am! |
I'm thinking of creating a new build job build:
docker:
- image: circleci/node:latest
- image: circleci/postgres:latest
steps:
- checkout
- setup_remote_docker
- run: npm install
- run:
name: Docker compose up
command: |
set -ex
docker-compose up -d Should i send request to every app after we do docker-compose, also if I'm doing anything wrong, please tell, I'm not quite familiar with CircleCI... |
I don't think you need the postgres container in there -- the docker compose command should cause a postgres container to be spun up automatically. @zacanger if it requires putting secret creds into circle-ci that could be a problem -- or we would only have to let that test run on master since even if you have creds in the "secure env variables" section, they still need to be decrypted when passed on the command line which can cause cred leakage :( |
Good point. I opened a new issue #291 about this so I don't hijack this issue. |
We need tests to ensure changes are able to generate packages and that running docker-compose doesn't fail on these changes.
If anyone is interested in working on this that would be great!
The text was updated successfully, but these errors were encountered: