mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 07:26:47 +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:
@@ -22,12 +22,17 @@ const (
|
||||
canManipulateRealOrders = false
|
||||
)
|
||||
|
||||
var a = &Alphapoint{}
|
||||
var a *Alphapoint
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
a = new(Alphapoint)
|
||||
a.SetDefaults()
|
||||
a.SetCredentials(apiKey, apiSecret, "", "", "", "")
|
||||
a.API.AuthenticatedSupport = true
|
||||
|
||||
if apiKey != "" && apiSecret != "" {
|
||||
a.API.AuthenticatedSupport = true
|
||||
a.SetCredentials(apiKey, apiSecret, "", "", "", "")
|
||||
}
|
||||
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user