From e2ba539edd41af387eacdd777ad491bac941908a Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Mon, 20 Jan 2025 09:00:01 +0100 Subject: [PATCH] Exception for error check in accounts/keystore/account_cache_test.go --- accounts/keystore/account_cache_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/accounts/keystore/account_cache_test.go b/accounts/keystore/account_cache_test.go index edf1303324..5b32670fcf 100644 --- a/accounts/keystore/account_cache_test.go +++ b/accounts/keystore/account_cache_test.go @@ -307,7 +307,9 @@ func TestCacheFind(t *testing.T) { } for i, test := range tests { a, err := cache.find(test.Query) - if !errors.Is(err, test.WantError) { + if (err == nil && test.WantError != nil) || + (err != nil && test.WantError == nil) || + (err != nil && err.Error() != test.WantError.Error()) { t.Errorf("test %d: error mismatch for query %v\ngot %q\nwant %q", i, test.Query, err, test.WantError) continue }