Documentation
¶
Overview ¶
Package testdocker publishes a container's port on a host port docker picks, for the smoke tests that run real containers.
WHY. Picking a free port first (listen on :0, close, pass the number to `docker run -p 127.0.0.1:<port>:…`) is a race: between the close and docker's bind, anything else on the machine can take the port, and the run fails with "failed to bind host port 127.0.0.1:40003/tcp: address already in use" (control-plane's TestOtlpPublicRateLimitsAgainstEnvoy failed on main that way, control-plane#2085). Docker binding a port of its own choosing cannot collide. TestNoPrePickedDockerHostPorts keeps the old spelling out of forge's tests.
Test-only by intent: nothing outside _test.go files imports it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.