mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 07:26:47 +00:00
Engine/ExchangeManager: Return error for method GetExchangeByName (#760)
* engine: Add error returns * engine: after merge fixes * engine: remove interface * linter: fix shadow declarations * engine: fix tests * niterinos: fixed * GLORIOUS NITS!
This commit is contained in:
@@ -503,12 +503,17 @@ func TestCancelAllOrders(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
exch := m.orderStore.exchangeManager.GetExchangeByName(testExchange)
|
||||
|
||||
m.CancelAllOrders([]exchange.IBotExchange{})
|
||||
if o.Status == order.Cancelled {
|
||||
t.Error("Order should not be cancelled")
|
||||
}
|
||||
|
||||
exch, err := m.orderStore.exchangeManager.GetExchangeByName(testExchange)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
m.CancelAllOrders([]exchange.IBotExchange{exch})
|
||||
if o.Status != order.Cancelled {
|
||||
t.Error("Order should be cancelled")
|
||||
|
||||
Reference in New Issue
Block a user