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 verify command #6408

Closed
trajano opened this issue Dec 10, 2018 · 4 comments
Closed

Add verify command #6408

trajano opened this issue Dec 10, 2018 · 4 comments

Comments

@trajano
Copy link

trajano commented Dec 10, 2018

Is your feature request related to a problem? Please describe.

For CI, it would be good to verify that the docker-compose would work correctly.

Describe the solution you'd like

When I do docker-compose verify it does the same thing as docker-compose up and waits for the healthcheck to pass for all the services. Once it passes, it runs docker-compose down to tear down the app.

Some other parameters to consider are:

  • --build force a build even if it is not needed
  • --limit=60s time limit before giving up on health checks to pass
  • --keep-up keeps the services up after verifying. This allows more complex integration tests to be executed after the healthchecks are up.

Describe alternatives you've considered

We create a separate test application that waits for the stack to come up and run our tests.

@shin-
Copy link

shin- commented Dec 13, 2018

Thanks for the suggestion @trajano !

The way I look at it, this seems like a very specific scenario you want to introduce as a mainline command. I'd assume users would have wildly differing expectations of what a verify command would do and how it should behave, and as a result, I don't think it would be wise for us to attempt to introduce a solution to "application checking" that would only ever satisfy a small portion of our users. It also seems a bit out of scope for Compose.

Note that the docker-compose events command will inform you once a service becomes healthy, which can help you write a script or a program to do what you describe.

@trajano
Copy link
Author

trajano commented Dec 13, 2018

NP we already have the "tests" for the Java apps using testcontainers. However, for something simple I'd rather avoid all the harness that is needed.

But I'd rather see if there's any interest on this from other members before we just close it much like json-schema-org/json-schema-spec#396 generated a lot of interest.

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 17, 2022
@stale
Copy link

stale bot commented Apr 25, 2022

This issue has been automatically closed because it had not recent activity during the stale period.

@stale stale bot closed this as completed Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants