diff --git a/exchanges/kraken/kraken_test.go b/exchanges/kraken/kraken_test.go index 106f4e16cc4..e15934b3a98 100644 --- a/exchanges/kraken/kraken_test.go +++ b/exchanges/kraken/kraken_test.go @@ -938,6 +938,8 @@ func TestWsSubscribe(t *testing.T) { currency.NewPairWithDelimiter("ETH", "USD", "/"), currency.NewPairWithDelimiter("LTC", "ETH", "/"), currency.NewPairWithDelimiter("ETH", "XBT", "/"), + currency.NewPairWithDelimiter("DWARF", "HOBBIT", "/"), + currency.NewPairWithDelimiter("DWARF", "GOBLIN", "/"), }, asset.Spot, enabled), "SetPairs must not error") } @@ -954,8 +956,7 @@ func TestWsSubscribe(t *testing.T) { assert.Equal(t, subscription.SubscribedState, subs[0].State(), "Existing subscription state should not change") err = k.Subscribe(subscription.List{{Asset: asset.Spot, Channel: subscription.TickerChannel, Pairs: currency.Pairs{currency.NewPairWithDelimiter("DWARF", "HOBBIT", "/")}}}) - assert.ErrorIs(t, err, currency.ErrPairNotContainedInAvailablePairs, "Subscribing to an invalid pair should error correctly") - assert.ErrorContains(t, err, "DWARF/HOBBIT", "Subscribing to an invalid pair should error correctly") + assert.ErrorContains(t, err, "Currency pair not supported; Channel: ticker Pairs: DWARF/HOBBIT", "Subscribing to an invalid pair should error correctly") require.Len(t, k.Websocket.GetSubscriptions(), 1, "Should not add a subscription on error") // Mix success and failure @@ -964,9 +965,7 @@ func TestWsSubscribe(t *testing.T) { {Asset: asset.Spot, Channel: subscription.TickerChannel, Pairs: currency.Pairs{currency.NewPairWithDelimiter("DWARF", "HOBBIT", "/")}}, {Asset: asset.Spot, Channel: subscription.TickerChannel, Pairs: currency.Pairs{currency.NewPairWithDelimiter("DWARF", "ELF", "/")}}, }) - assert.ErrorIs(t, err, currency.ErrPairNotContainedInAvailablePairs, "Subscribing to an invalid pair should error correctly") - assert.ErrorContains(t, err, "DWARF/ELF", "Subscribing to an invalid pair should error correctly") - assert.ErrorContains(t, err, "DWARF/HOBBIT", "Subscribing to an invalid pair should error correctly") + assert.ErrorContains(t, err, "Currency pair not supported; Channel: ticker Pairs: DWARF/HOBBIT,DWARF/ELF", "Subscribing to an invalid pair should error correctly") require.Len(t, k.Websocket.GetSubscriptions(), 2, "Should have 2 subscriptions after mixed success/failures") // Just failures @@ -974,9 +973,7 @@ func TestWsSubscribe(t *testing.T) { {Asset: asset.Spot, Channel: subscription.TickerChannel, Pairs: currency.Pairs{currency.NewPairWithDelimiter("DWARF", "HOBBIT", "/")}}, {Asset: asset.Spot, Channel: subscription.TickerChannel, Pairs: currency.Pairs{currency.NewPairWithDelimiter("DWARF", "GOBLIN", "/")}}, }) - assert.ErrorIs(t, err, currency.ErrPairNotContainedInAvailablePairs, "Subscribing to an invalid pair should error correctly") - assert.ErrorContains(t, err, "DWARF/GOBLIN", "Subscribing to an invalid pair should error correctly") - assert.ErrorContains(t, err, "DWARF/HOBBIT", "Subscribing to an invalid pair should error correctly") + assert.ErrorContains(t, err, "Currency pair not supported; Channel: ticker Pairs: DWARF/HOBBIT,DWARF/GOBLIN", "Subscribing to an invalid pair should error correctly") require.Len(t, k.Websocket.GetSubscriptions(), 2, "Should have 2 subscriptions after mixed success/failures") // Just success