powerful-eye-58407
07/14/2023, 7:29 AMpants tests path/to/tests::
with BUILD file for tests containing env variables like SERVICE_HOST=hostname
that are read by tests and used to connected to tested service run by compose.
Now, those component tests work in docker_environment, which means they are run in docker container with network mode set to bridge by default probably? On Mac, using docker desktop, it's enough to set SERVICE_HOST=host.docker.internal
to make the connection work. On linux, I need to pass custom option "--add-host=host.docker.internal:host-gateway"
to docker run. There's pants.toml docker.run_args section, but it looks like this is only used when I do pants run path/to/docker_target
and not when running environments?