mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
Exception for error check in accounts/keystore/account_cache_test.go
This commit is contained in:
parent
d245d7e868
commit
e2ba539edd
1 changed files with 3 additions and 1 deletions
|
|
@ -307,7 +307,9 @@ func TestCacheFind(t *testing.T) {
|
||||||
}
|
}
|
||||||
for i, test := range tests {
|
for i, test := range tests {
|
||||||
a, err := cache.find(test.Query)
|
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)
|
t.Errorf("test %d: error mismatch for query %v\ngot %q\nwant %q", i, test.Query, err, test.WantError)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue