chore(lint): upgrade linter to v2.4.0
- migrate configuration file - fix existing code issues - add exclusion rules - update linter names
This commit is contained in:
@@ -40,7 +40,11 @@ func Test_Server_healthCheck(t *testing.T) {
|
||||
t.Run("dial localhost:0", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
listener, err := net.Listen("tcp4", "localhost:0")
|
||||
const timeout = 100 * time.Millisecond
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
listenConfig := &net.ListenConfig{}
|
||||
listener, err := listenConfig.Listen(ctx, "tcp4", "localhost:0")
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
err = listener.Close()
|
||||
@@ -57,10 +61,6 @@ func Test_Server_healthCheck(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
const timeout = 100 * time.Millisecond
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
err = server.healthCheck(ctx)
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user