mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-16 07:26:47 +00:00
* Fix Bitstamp pair handling * Fix spelling * Populate namerinos * Address nitterinos * Revert trade currency code, introduces races between engine / this and rely on OB test instead * One liner
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
//go:build mock_test_off
|
|
// +build mock_test_off
|
|
|
|
// This will build if build tag mock_test_off is parsed and will do live testing
|
|
// using all tests in (exchange)_test.go
|
|
package bitstamp
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/thrasher-corp/gocryptotrader/config"
|
|
"github.com/thrasher-corp/gocryptotrader/exchanges/sharedtestvalues"
|
|
)
|
|
|
|
var mockTests = false
|
|
|
|
func TestMain(m *testing.M) {
|
|
cfg := config.GetConfig()
|
|
err := cfg.LoadConfig("../../testdata/configtest.json", true)
|
|
if err != nil {
|
|
log.Fatal("Bitstamp load config error", err)
|
|
}
|
|
bitstampConfig, err := cfg.GetExchangeConfig("Bitstamp")
|
|
if err != nil {
|
|
log.Fatal("Bitstamp Setup() init error", err)
|
|
}
|
|
bitstampConfig.API.AuthenticatedSupport = true
|
|
bitstampConfig.API.Credentials.Key = apiKey
|
|
bitstampConfig.API.Credentials.Secret = apiSecret
|
|
bitstampConfig.API.Credentials.ClientID = customerID
|
|
b.SetDefaults()
|
|
b.Websocket = sharedtestvalues.NewTestWebsocket()
|
|
err = b.Setup(bitstampConfig)
|
|
if err != nil {
|
|
log.Fatal("Bitstamp setup error", err)
|
|
}
|
|
log.Printf(sharedtestvalues.LiveTesting, b.Name)
|
|
os.Exit(m.Run())
|
|
}
|