mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
338d30e4c4
`Test_ProxyServer_Headers` never passed `--http-address`, so it bound to the default `127.0.0.1:3000`. `TestWorkspaceProxy_Server_PrometheusEnabled` used `RandomPort(t)` for `--http-address` (a drive-by from #14972 which was fixing the Prometheus port). Both now use `--http-address :0`. `ConfigureHTTPServers` calls `net.Listen("tcp", ":0")` and holds the listener open, so there is no TOCTOU window. Neither test connects to the HTTP listener, so the assigned port is irrelevant. This matches `cli/server_test.go` where `:0` is used throughout.