mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 23:16:53 +00:00
golangci-lint: Enable usetesting and unused linters (#1893)
* golangci-lint: Enable usetesting and unused linters * tests: Improve assertions in various test cases for clarity and accuracy * tests: Enhance error assertions in TestExecuteStrategyFromFile for improved clarity * tests: Update assertions for improved clarity and accuracy * tests: Replace assert with require for task count checks * config/versions/v7: Replace context.Background() with t.Context() * Bithumb: Centralise and consoliate testPair, relax UpdateTickers check with some glorious Doom Eternal music * Bithumb: Use UpdatePairsOnce and update remaining pair string * Bithumb: Add UpdatePairsOnce to TestUpdateTickers
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package engine
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
"slices"
|
||||
@@ -380,7 +379,7 @@ func TestGetDefaultConfigurations(t *testing.T) {
|
||||
t.Skipf("skipping %s unsupported", name)
|
||||
}
|
||||
|
||||
defaultCfg, err := exchange.GetDefaultConfig(context.Background(), exch)
|
||||
defaultCfg, err := exchange.GetDefaultConfig(t.Context(), exch)
|
||||
require.NoError(t, err, "GetDefaultConfig must not error")
|
||||
require.NotNil(t, defaultCfg)
|
||||
assert.NotEmpty(t, defaultCfg.Name, "Name should not be empty")
|
||||
@@ -480,7 +479,7 @@ func TestSetupExchanges(t *testing.T) {
|
||||
exchLoader := func(exch exchange.IBotExchange) {
|
||||
exch.SetDefaults()
|
||||
exch.GetBase().Features.Supports.RESTCapabilities.AutoPairUpdates = false
|
||||
cfg, err := exchange.GetDefaultConfig(context.Background(), exch)
|
||||
cfg, err := exchange.GetDefaultConfig(t.Context(), exch)
|
||||
require.NoError(t, err)
|
||||
e.Config.Exchanges = append(e.Config.Exchanges, *cfg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user