chore: Fix gosec G102 issues (#12923)

This commit is contained in:
Joshua Powers 2023-03-28 03:40:29 -06:00 committed by GitHub
parent 5e7c5c84e9
commit 3415cc8c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ func TestSocks5ProxyConfigIntegration(t *testing.T) {
}
const (
proxyAddress = "0.0.0.0:12345"
proxyAddress = "127.0.0.1:12345"
proxyUsername = "user"
proxyPassword = "password"
)

View File

@ -592,7 +592,7 @@ func TestExponentialBackoff(t *testing.T) {
max := 3
// get an unused port by listening on next available port, then closing it
listener, err := net.Listen("tcp", ":0")
listener, err := net.Listen("tcp", "127.0.0.1:0")
require.NoError(t, err)
port := listener.Addr().(*net.TCPAddr).Port
require.NoError(t, listener.Close())

View File

@ -83,7 +83,7 @@ func TestGatherRemoteIntegration(t *testing.T) {
}
}
ln, err := tls.Listen("tcp", ":0", cfg)
ln, err := tls.Listen("tcp", "127.0.0.1:0", cfg)
require.NoError(t, err)
defer ln.Close()