chore: avoid DNS lookups for DERP in tests (#19385)

Closes https://github.com/coder/internal/issues/886
This commit is contained in:
Dean Sheather
2025-08-18 13:44:37 +10:00
committed by GitHub
parent 93279dff24
commit 8f9f0cda11
4 changed files with 6 additions and 12 deletions
+1 -1
View File
@@ -471,7 +471,7 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
serverURL, err := url.Parse(srv.URL)
require.NoError(t, err)
serverURL.Host = fmt.Sprintf("localhost:%d", tcpAddr.Port)
serverURL.Host = fmt.Sprintf("127.0.0.1:%d", tcpAddr.Port)
derpPort, err := strconv.Atoi(serverURL.Port())
require.NoError(t, err)