Bump golangci-lint to 2.3.0 and fix issues

This commit is contained in:
Joshua Casey
2025-07-30 10:25:23 -05:00
parent b387a2cae9
commit 1c1b3b7f2e
16 changed files with 41 additions and 31 deletions
@@ -544,12 +544,13 @@ func TestImpersonatorConfigControllerSync(t *testing.T) {
expectedErrorRegex := "dial tcp .*: connect: connection refused"
expectedErrorRegexCompiled, err := regexp.Compile(expectedErrorRegex)
r.NoError(err)
dialer := tls.Dialer{}
assert.Eventually(t, func() bool {
_, err = tls.Dial(
_, err = dialer.DialContext(
context.Background(),
"tcp",
testServerAddr(),
&tls.Config{InsecureSkipVerify: true}, //nolint:gosec
)
testServerAddr())
return err != nil && expectedErrorRegexCompiled.MatchString(err.Error())
}, 20*time.Second, 50*time.Millisecond)
r.Error(err)