shanejansen / touchstone

Touchstone is a testing framework for your services that focuses on component, end-to-end, and exploratory testing.
17 stars 2 forks source link

Underspecified docker errors #37

Open ScottFreeCode opened 2 years ago

ScottFreeCode commented 2 years ago

Sometimes when a container has catastrophically failed, Touchstone goes to stop it as part of network shutdown and spits out an error saying no such container. This isn't very detailed and isn't obvious to all developers that the real issue is the container died when it attempted to start up. (In contrast, a healthcheck never passing spits out a whole stack trace where all we need to know is which container's healthcheck never became healthy.)

Would it be possible to catch the Docker missing container error and provide a message saying which mock or service died or wasn't started, and ensure this does not block shutting down the rest of the network?

(Relatedly I would expect a similarly informative error if the Docker command to build or to start/run the container in the first place errors; it's been a while since I had that happen so I don't recall what it looks like, though I think it may be reproducible by attempting to run while the app's port is already allocated to another app or instance.)