Skip to content

Commit

Permalink
fixup! GateIO: Split asset.Futures into CoinM and USDT
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Feb 13, 2025
1 parent 74d949c commit 13b349a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exchanges/gateio/gateio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2056,11 +2056,13 @@ func TestFuturesDataHandler(t *testing.T) {
g := new(Gateio) //nolint:govet // Intentional shadow to avoid future copy/paste mistakes
require.NoError(t, testexch.Setup(g), "Test instance Setup must not error")
testexch.FixtureToDataHandler(t, "testdata/wsFutures.json", func(m []byte) error { return g.WsHandleFuturesData(context.Background(), m, asset.CoinMarginedFutures) })
g.Websocket.DataHandler <- errors.New("hamster")
close(g.Websocket.DataHandler)
assert.Len(t, g.Websocket.DataHandler, 14, "Should see the correct number of messages")
for resp := range g.Websocket.DataHandler {
_, isErr := resp.(error)
assert.False(t, isErr, "Should not get any errors down the data handler")
if err, isErr := resp.(error); isErr {
assert.NoError(t, err, "Should not get any errors down the data handler")
}
}
}

Expand Down

0 comments on commit 13b349a

Please sign in to comment.