shanejansen / touchstone

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

Wrong container name flag #51

Open ScottFreeCode opened 1 year ago

ScottFreeCode commented 1 year ago

At work, my local machine is able to make service-to-service REST calls as intended referencing other containers through their name. Unfortunately it isn't working in CI.

It turns out this is an oddity in our machines, not CI. As far as I have been able to figure out, Docker's DNS settings will use --hostname to resolve the host by name for that container itself, but the proper way to set it for the rest of the network appears to be --network-alias For some reason hostname works on our local, but whatever we've got on CI appears to be more strict.

Touchstone is using --hostname; I believe it should be updated to use --network-alias for maximum compatibility.

A workaround for now is to add --network-alias <your service name> to docker_options in your touchstone.yml file.