Open shishkin opened 1 month ago
You could add a Pact with a single interaction that has the health route that just returns a 200 OK
That would require the provider to implement that same route for verification to pass. That may not be desirable or even possible.
Why? The stub server doesn't do verification, it just there to be a pretend server.
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.
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.