chore: Fix gosec G102 issues (#12923)
This commit is contained in:
parent
5e7c5c84e9
commit
3415cc8c80
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue