Skip to content

Commit

Permalink
fixup! Bitmex: Sub Templating
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Jul 22, 2024
1 parent 3531211 commit c31f362
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exchanges/bitmex/bitmex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,9 @@ func TestGetCurrencyTradeURL(t *testing.T) {
func TestGenerateSubscriptions(t *testing.T) {
t.Parallel()

b := new(Bitmex)
require.NoError(t, testexch.Setup(b), "Test instance Setup must not error")

p := currency.Pairs{
currency.NewPair(currency.ETH, currency.USD),
currency.NewPair(currency.BCH, currency.NewCode("Z19")),
Expand All @@ -1384,6 +1387,7 @@ func TestGenerateSubscriptions(t *testing.T) {
{QualifiedChannel: bitmexWSPosition + ":" + p[0].String(), Channel: bitmexWSPosition, Authenticated: true, Asset: asset.PerpetualContract, Pairs: p[:1]},
}

b.Websocket.SetCanUseAuthenticatedEndpoints(true)
subs, err := b.generateSubscriptions()
require.NoError(t, err, "generateSubscriptions must not error")
testsubs.EqualLists(t, exp, subs)
Expand Down

0 comments on commit c31f362

Please sign in to comment.