From 4e986c8af7b3017f1ac85cba9413de20488bfc10 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Thu, 11 Jun 2026 13:37:58 +0000 Subject: [PATCH] chore(socks5): fix lint errors on integration test --- internal/socks5/udp_router_integration_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/socks5/udp_router_integration_test.go b/internal/socks5/udp_router_integration_test.go index cecfa506..2785567f 100644 --- a/internal/socks5/udp_router_integration_test.go +++ b/internal/socks5/udp_router_integration_test.go @@ -19,6 +19,8 @@ import ( ) func Test_udpRouter_ResolveGithubFromCloudflareDNS(t *testing.T) { + t.Parallel() + ctx := t.Context() var cancel context.CancelFunc deadline, hasDeadline := ctx.Deadline() @@ -107,7 +109,7 @@ func Test_udpRouter_ResolveGithubFromCloudflareDNS(t *testing.T) { assert.NoError(t, err, "closing client UDP connection") }) - queryID := uint16(rand.Uint()) + queryID := uint16(rand.Uint32()) //nolint:gosec dnsRequest := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: queryID, @@ -156,7 +158,7 @@ func Test_udpRouter_ResolveGithubFromCloudflareDNS(t *testing.T) { assert.Equal(t, dns.RcodeSuccess, dnsResponse.Rcode) require.NotEmpty(t, dnsResponse.Question) assert.Equal(t, dns.Fqdn("github.com"), dnsResponse.Question[0].Name) - assert.Equal(t, uint16(dns.TypeA), dnsResponse.Question[0].Qtype) + assert.Equal(t, dns.TypeA, dnsResponse.Question[0].Qtype) assert.NotEmpty(t, dnsResponse.Answer) require.NoError(t, err) }