mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-20 23:16:49 +00:00
Test: Internal exchange coverage (#1525)
* Test: Internal exchange coverage * Tests: Rename exchange.TestInstance to Setup This package function is either going to be imported and used as just exchange.Setup, or more likely testexch.Setup. This removes the Stutter of having internal/testing/exchange.TestInstance which is implicit given the package path
This commit is contained in:
@@ -20,7 +20,7 @@ var mockTests = false
|
||||
func TestMain(m *testing.M) {
|
||||
|
||||
b = new(Binance)
|
||||
if err := testexch.TestInstance(b); err != nil {
|
||||
if err := testexch.Setup(b); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
b = new(Binance)
|
||||
if err := testexch.TestInstance(b); err != nil {
|
||||
if err := testexch.Setup(b); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ const (
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
k = new(Kraken)
|
||||
if err := testexch.TestInstance(k); err != nil {
|
||||
if err := testexch.Setup(k); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if apiKey != "" && apiSecret != "" {
|
||||
|
||||
@@ -2736,8 +2736,7 @@ func TestGetOpenInterest(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
nu := new(Kucoin)
|
||||
require.NoError(t, testexch.TestInstance(nu), "TestInstance setup should not error")
|
||||
|
||||
require.NoError(t, testexch.Setup(nu), "Test exchange Setup must not error")
|
||||
_, err := nu.GetOpenInterest(context.Background(), key.PairAsset{
|
||||
Base: currency.ETH.Item,
|
||||
Quote: currency.USDT.Item,
|
||||
|
||||
Reference in New Issue
Block a user