From ac6132f311965fd734ec81b627f8230e42ea014f Mon Sep 17 00:00:00 2001 From: Bitonic Date: Thu, 24 Oct 2024 08:16:22 +0000 Subject: [PATCH] Updated to v0.7.4 --- .golangci.yml | 2 -- internal/generic/validation_test.go | 17 ++++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 952c2ad..8911c3b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -43,10 +43,8 @@ linters: - errchkjson - errname - errorlint - - execinquery - exhaustive - exhaustruct - - exportloopref - forbidigo - forcetypeassert - gci diff --git a/internal/generic/validation_test.go b/internal/generic/validation_test.go index 0a04ce1..b8f3937 100644 --- a/internal/generic/validation_test.go +++ b/internal/generic/validation_test.go @@ -11,7 +11,6 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/txscript" "github.com/decred/dcrd/dcrec/secp256k1/v4" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/bitonicnl/verify-signed-message/internal/generic" @@ -82,9 +81,9 @@ func (s *ValidateTestSuite) TestValidateP2PKH() { } for _, tt := range tests { - s.T().Run(tt.name, func(t *testing.T) { + s.Run(tt.name, func() { _, err := generic.ValidateP2PKH(tt.args.recoveryFlag, tt.args.pubKeyHash, tt.args.addr, &chaincfg.MainNetParams) - require.Equal(t, tt.want, err) + s.Require().Equal(tt.want, err) }) } } @@ -132,9 +131,9 @@ func (s *ValidateTestSuite) TestValidateP2SH() { } for _, tt := range tests { - s.T().Run(tt.name, func(t *testing.T) { + s.Run(tt.name, func() { _, err := generic.ValidateP2SH(tt.args.recoveryFlag, tt.args.pubKeyHash, tt.args.addr, &chaincfg.MainNetParams) - require.Equal(t, tt.want, err) + s.Require().Equal(tt.want, err) }) } } @@ -173,9 +172,9 @@ func (s *ValidateTestSuite) TestValidateP2WPKH() { } for _, tt := range tests { - s.T().Run(tt.name, func(t *testing.T) { + s.Run(tt.name, func() { _, err := generic.ValidateP2WPKH(tt.args.recoveryFlag, tt.args.witnessProg, tt.args.addr, &chaincfg.MainNetParams) - require.Equal(t, tt.want, err) + s.Require().Equal(tt.want, err) }) } } @@ -230,9 +229,9 @@ func (s *ValidateTestSuite) TestValidateP2TR() { } for _, tt := range tests { - s.T().Run(tt.name, func(t *testing.T) { + s.Run(tt.name, func() { _, err := generic.ValidateP2TR(tt.args.recoveryFlag, tt.args.pubKey, tt.args.addr, &chaincfg.MainNetParams) - require.Equal(t, tt.want, err) + s.Require().Equal(tt.want, err) }) } }