Skip to content

Commit

Permalink
chore: Fix gosec G102 issues (influxdata#12923)
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored Mar 28, 2023
1 parent 5e7c5c8 commit 3415cc8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/common/proxy/socks5_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/kafka_consumer/kafka_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/x509_cert/x509_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 3415cc8

Please sign in to comment.