From ae27ab1a8804cfa478c62aeaf1d826c03a7c10fb Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Sat, 25 Jan 2025 17:25:00 +0700 Subject: [PATCH] fixup! GateIO: Split asset.Futures into CoinM and USDT --- exchanges/gateio/gateio_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/exchanges/gateio/gateio_test.go b/exchanges/gateio/gateio_test.go index 126ee79314d..c313e8240aa 100644 --- a/exchanges/gateio/gateio_test.go +++ b/exchanges/gateio/gateio_test.go @@ -1754,8 +1754,15 @@ func TestGetSingleSubAccount(t *testing.T) { func TestFetchTradablePairs(t *testing.T) { t.Parallel() for _, a := range g.GetAssetTypes(false) { - _, err := g.FetchTradablePairs(context.Background(), a) - assert.NoErrorf(t, err, "FetchTradablePairs should not error for %s", a) + pairs, err := g.FetchTradablePairs(context.Background(), a) + require.NoErrorf(t, err, "FetchTradablePairs must not error for %s", a) + require.NotEmptyf(t, pairs, "FetchTradablePairs must return some pairs for %s", a) + if a == asset.USDTMarginedFutures || a == asset.CoinMarginedFutures { + for _, p := range pairs { + _, err := getSettlementCurrency(a, p) + require.NoErrorf(t, err, "Fetched pair %s %s must not error on getSettlementCurrency", a, p) + } + } } } @@ -2823,6 +2830,8 @@ func TestGetCurrencyTradeURL(t *testing.T) { pairs, err := g.CurrencyPairs.GetPairs(a, false) require.NoError(t, err, "cannot get pairs for %s", a) require.NotEmpty(t, pairs, "no pairs for %s", a) + t.Log(a) + t.Log(pairs) resp, err := g.GetCurrencyTradeURL(context.Background(), a, pairs[0]) if a == asset.Options { require.ErrorIs(t, err, asset.ErrNotSupported)