From f157f3f9818c6c4351005d2f2fdd86adadef4cd7 Mon Sep 17 00:00:00 2001 From: Gavin Frazar Date: Tue, 10 Dec 2024 18:15:11 -0800 Subject: [PATCH] fix lint --- lib/srv/alpnproxy/local_proxy_test.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/srv/alpnproxy/local_proxy_test.go b/lib/srv/alpnproxy/local_proxy_test.go index 785067478e7e5..347ca22e891ec 100644 --- a/lib/srv/alpnproxy/local_proxy_test.go +++ b/lib/srv/alpnproxy/local_proxy_test.go @@ -21,11 +21,8 @@ package alpnproxy import ( "bytes" "context" - "crypto/sha256" "crypto/tls" "crypto/x509" - "encoding/hex" - "errors" "io" "net" "net/http" @@ -143,7 +140,7 @@ func TestHandleAWSAccessSigVerification(t *testing.T) { require.Error(t, err) var serr *awshttp.ResponseError - require.True(t, errors.As(err, &serr)) + require.ErrorAs(t, err, &serr) require.Equal(t, tc.wantStatus, serr.HTTPStatusCode()) }) } @@ -767,12 +764,6 @@ func TestGetCertsForConn(t *testing.T) { } } -func hashPayload(payload []byte) string { - hasher := sha256.New() - io.Copy(hasher, bytes.NewReader(payload)) - return hex.EncodeToString(hasher.Sum(nil)) -} - type addUserAgentSignedHeaderMiddleware struct { }