Skip to content

Commit

Permalink
Coinbase: Skip deprecated APIs
Browse files Browse the repository at this point in the history
DriveBy: error assertion for GetHistoricTrades. Accidentally mowed it
down at a pedestrian crossing.
  • Loading branch information
gbjk committed Dec 18, 2024
1 parent 16e5398 commit 3dc3a9b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions exchanges/coinbasepro/coinbasepro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func TestGetTicker(t *testing.T) {
}

func TestGetTrades(t *testing.T) {
t.Skip("API is deprecated")
_, err := c.GetTrades(context.Background(), testPair.String())
if err != nil {
t.Error("GetTrades() error", err)
Expand Down Expand Up @@ -130,13 +131,15 @@ func TestCoinbasePro_GetHistoricCandlesExtended(t *testing.T) {
}

func TestGetStats(t *testing.T) {
t.Skip("API is deprecated")
_, err := c.GetStats(context.Background(), testPair.String())
if err != nil {
t.Error("GetStats() error", err)
}
}

func TestGetCurrencies(t *testing.T) {
t.Skip("API is deprecated")
_, err := c.GetCurrencies(context.Background())
if err != nil {
t.Error("GetCurrencies() error", err)
Expand Down Expand Up @@ -1036,6 +1039,7 @@ func TestParseTime(t *testing.T) {
}

func TestGetRecentTrades(t *testing.T) {
t.Skip("API is deprecated")
t.Parallel()
_, err := c.GetRecentTrades(context.Background(), testPair, asset.Spot)
if err != nil {
Expand All @@ -1045,11 +1049,8 @@ func TestGetRecentTrades(t *testing.T) {

func TestGetHistoricTrades(t *testing.T) {
t.Parallel()
_, err := c.GetHistoricTrades(context.Background(),
testPair, asset.Spot, time.Now().Add(-time.Minute*15), time.Now())
if err != nil && err != common.ErrFunctionNotSupported {
t.Error(err)
}
_, err := c.GetHistoricTrades(context.Background(), testPair, asset.Spot, time.Now().Add(-time.Minute*15), time.Now())
require.ErrorIs(t, err, common.ErrFunctionNotSupported)
}

func TestGetTransfers(t *testing.T) {
Expand All @@ -1062,6 +1063,7 @@ func TestGetTransfers(t *testing.T) {
}

func TestGetCurrencyTradeURL(t *testing.T) {
t.Skip("API is deprecated")
t.Parallel()
testexch.UpdatePairsOnce(t, c)
for _, a := range c.GetAssetTypes(false) {
Expand Down

0 comments on commit 3dc3a9b

Please sign in to comment.