mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-28 07:26:57 +00:00
exchanges: Improve TestMain usage (#1946)
* exchanges: Improve TestMain usage * exchanges: Further cleanups * exchanges/kucoin: update TestProcessOrderbook to use test context * refactor: rename SetRunning to SetRunningURL for clarity across exchanges
This commit is contained in:
@@ -20,7 +20,7 @@ var mockTests = false
|
||||
func TestMain(m *testing.M) {
|
||||
b = new(Bybit)
|
||||
if err := testexch.Setup(b); err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("Bybit Setup error: %s", err)
|
||||
}
|
||||
|
||||
if apiKey != "" && apiSecret != "" {
|
||||
|
||||
@@ -20,13 +20,13 @@ var mockTests = true
|
||||
func TestMain(m *testing.M) {
|
||||
b = new(Bybit)
|
||||
if err := testexch.Setup(b); err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("Bybit Setup error: %s", err)
|
||||
}
|
||||
|
||||
b.SetCredentials("mock", "tester", "", "", "", "") // Hack for UpdateAccountInfo test
|
||||
|
||||
if err := testexch.MockHTTPInstance(b); err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("Bybit MockHTTPInstance error: %s", err)
|
||||
}
|
||||
|
||||
if err := b.UpdateTradablePairs(context.Background(), true); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user