codebase: Replace !errors.Is(err, target) with testify (#1931)

* tests: Replace !errors.Is(err, target) with testify equivalents

* codebase: Manual !errors.Is(err, target) replacements

* typo: Replace errMisMatchedEvent with errMismatchedEvent

* tests: Enhance error messages for better output

* tests: Refactor error assertions in various test cases to use require and improve clarity

* misc linter: Fix assert should wording

* tests: Simplify assertions in TestCreateSignals for clarity and conciseness

* tests: Enhance assertion message in TestCreateSignals
This commit is contained in:
Adrian Gallagher
2025-06-10 16:29:57 +10:00
committed by GitHub
parent 122ab2f849
commit 19b8957f3f
109 changed files with 2485 additions and 5670 deletions

View File

@@ -1,7 +1,6 @@
package gemini
import (
"errors"
"net/url"
"strings"
"testing"
@@ -1268,14 +1267,10 @@ func TestSetExchangeOrderExecutionLimits(t *testing.T) {
t.Fatal(err)
}
err = g.UpdateOrderExecutionLimits(t.Context(), asset.Futures)
if !errors.Is(err, asset.ErrNotSupported) {
t.Fatal(err)
}
assert.ErrorIs(t, err, asset.ErrNotSupported)
availPairs, err := g.GetAvailablePairs(asset.Spot)
if err != nil {
t.Fatal(err)
}
require.NoError(t, err)
for x := range availPairs {
var limit order.MinMaxLevel
limit, err = g.GetOrderExecutionLimits(asset.Spot, availPairs[x])