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

Health check #70

Open
shishkin opened this issue May 31, 2024 · 4 comments
Open

Health check #70

shishkin opened this issue May 31, 2024 · 4 comments

Comments

@shishkin
Copy link

As far as I understand, stub server only responds to requests from the pacts. I think it would make sense to also add a diagnostics route like /health or maybe better something like /_pact/health that could be used by infrastructure to know when the service is ready and if it is alive. I'm using process-compose to orchestrate dev environment and process compose can only do HTTP and command execution checks.

@rholshausen
Copy link
Contributor

You could add a Pact with a single interaction that has the health route that just returns a 200 OK

@shishkin
Copy link
Author

That would require the provider to implement that same route for verification to pass. That may not be desirable or even possible.

@rholshausen
Copy link
Contributor

Why? The stub server doesn't do verification, it just there to be a pretend server.

@shishkin
Copy link
Author

Oh, I see. I think you mean I can create a separate pact, that I don't have to verify but just feed it to the stub server. That would work.

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

No branches or pull requests

2 participants