Files
gocryptotrader/config/versions/v0/v0_test.go
Adrian Gallagher bea16af380 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
2025-05-01 14:44:29 +10:00

26 lines
592 B
Go

package v0_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v0 "github.com/thrasher-corp/gocryptotrader/config/versions/v0"
)
func TestUpgradeConfig(t *testing.T) {
t.Parallel()
in := []byte(`{"untouched":true}`)
out, err := new(v0.Version).UpgradeConfig(t.Context(), in)
require.NoError(t, err)
assert.Equal(t, in, out)
}
func TestDowngradeConfig(t *testing.T) {
t.Parallel()
in := []byte(`{"untouched":true}`)
out, err := new(v0.Version).DowngradeConfig(t.Context(), in)
require.NoError(t, err)
assert.Equal(t, in, out)
}