Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Add tests for docker compose #130

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

sladyn98
Copy link
Contributor

@sladyn98 sladyn98 commented Aug 12, 2020

Added bash scripts to test the docker compose

@sladyn98 sladyn98 requested a review from a team as a code owner August 12, 2020 08:36
@martinda
Copy link
Contributor

For this PR, we discussed using testcontainers and another method I think but sorry I don't remember, @kwhetstone do you remember?

Copy link
Contributor

@kwhetstone kwhetstone left a comment

Choose a reason for hiding this comment

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

So a few things: I think minimally that this repository should have tests available to LOCALLY run in order to confirm that nothing breaks in docker. I know that the cost of running the agents that run docker tests is much higher, so I think that we should try to pull that into the Jenkinsfile builds only if we're absolutely sure these tests are accurately producing status for the docker-compose.

The base question: can you run locally, and can you then actually confirm everything works? As much as I hesitate to share this (as I have some nightmareish experiences with the application that used this particular maven plugin), you might want to investigate running plugin tests with docker-maven-plugin. You can add options to skip those tests, which is what you'll end up doing for the Jenkins build.

@sladyn98 sladyn98 changed the title WIP : Add tests for docker compose Add tests for docker compose Aug 20, 2020
@sladyn98
Copy link
Contributor Author

Added docker scripts to test locally

@sladyn98 sladyn98 changed the title Add tests for docker compose WIP: Add tests for docker compose Aug 20, 2020
@sladyn98
Copy link
Contributor Author

sladyn98 commented Aug 21, 2020

@kwhetstone @martinda Added scripts to test the docker compose locally.
a) build_docker.sh: Builds and runs the containers using docker compose
c) test_docker_endpoint.sh: Tests the apis exposed
I ran all these scripts and they work well for testing them locally

@sladyn98 sladyn98 changed the title WIP: Add tests for docker compose Add tests for docker compose Aug 21, 2020
@sladyn98
Copy link
Contributor Author

How to test
a) build_docker.sh: Run ./build_docker.sh which builds the container.
b) run_docker.sh: Run ./run_docker.sh port-number eg: If the backend is running on 8080 ./run_docker.sh 8080 will spin up the containers, test the apis and then tear-down the docker containers.

@sladyn98 sladyn98 linked an issue Aug 23, 2020 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test the Dockerfile Creation locally
3 participants