mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-23 23:16:49 +00:00
testing: bybit references, bybit mock testing, pair formatting, standards improvement (#1322)
* fixes tests * pair formats and extra fixes * quick change before shazbert sees * sneaky lint * adds bybit mock testing and fixes test * whoops * error response instead * classic forgetting to lint * bybit live test no longer auto-records results * ty thrasher- Update exchanges/bybit/bybit_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> --------- Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -72,7 +72,7 @@ func TestLoadTrades(t *testing.T) {
|
||||
ConfigFormat: ¤cy.PairFormat{Uppercase: true},
|
||||
RequestFormat: ¤cy.PairFormat{Uppercase: true}}
|
||||
interval := gctkline.OneMin
|
||||
tt1 := time.Now().Add(-time.Minute * 2).Round(interval.Duration())
|
||||
tt1 := time.Now().Add(-time.Minute * 10).Round(interval.Duration())
|
||||
tt2 := time.Now().Round(interval.Duration())
|
||||
a := asset.Spot
|
||||
var data *gctkline.Item
|
||||
|
||||
@@ -38,7 +38,7 @@ func TestLoadCandles(t *testing.T) {
|
||||
ConfigFormat: pFormat,
|
||||
}
|
||||
var data *gctkline.Item
|
||||
data, err = LoadData(context.Background(), time.Now(), exch, common.DataCandle, interval.Duration(), cp, currency.EMPTYPAIR, a, true)
|
||||
data, err = LoadData(context.Background(), time.Now().Add(-interval.Duration()*10), exch, common.DataCandle, interval.Duration(), cp, currency.EMPTYPAIR, a, true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -73,7 +73,7 @@ func TestLoadTrades(t *testing.T) {
|
||||
ConfigFormat: pFormat,
|
||||
}
|
||||
var data *gctkline.Item
|
||||
data, err = LoadData(context.Background(), time.Now(), exch, common.DataTrade, interval.Duration(), cp, currency.EMPTYPAIR, a, true)
|
||||
data, err = LoadData(context.Background(), time.Now().Add(-interval.Duration()*10), exch, common.DataTrade, interval.Duration(), cp, currency.EMPTYPAIR, a, true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user