Skip to content

Commit

Permalink
Tests: Fix inconsistent should/must assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Dec 9, 2024
1 parent 36e766a commit 262c5d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/config_encryption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ func TestSaveAndReopenEncryptedConfig(t *testing.T) {
require.NoError(t, err, "ReadConfigFromFile must not error")
})

assert.Equal(t, "myCustomName", readConf.Name, "Name must be correct")
assert.Equal(t, 1, readConf.EncryptConfig, "EncryptConfig must be set correctly")
assert.Equal(t, "myCustomName", readConf.Name, "Name should be correct")
assert.Equal(t, 1, readConf.EncryptConfig, "EncryptConfig should be set correctly")
}

func TestReadConfigWithPrompt(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions engine/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ func TestConfigAllJsonResponse(t *testing.T) {
// Using require here makes it much easier to isolate differences per-exchange than below
// We look into pointers separately
for a, p := range e.CurrencyPairs.Pairs {
require.Equalf(t, c.Exchanges[i].CurrencyPairs.Pairs[a], p, "%s exchange Config CurrencyManager Pairs for asset %s should match api response", e.Name, a)
require.Equalf(t, c.Exchanges[i].CurrencyPairs.Pairs[a], p, "%s exchange Config CurrencyManager Pairs for asset %s must match api response", e.Name, a)
}
require.Equalf(t, c.Exchanges[i].CurrencyPairs, e.CurrencyPairs, "%s exchange Config CurrencyManager should match api response", e.Name)
require.Equalf(t, c.Exchanges[i], e, "%s exchange Config should match api response", e.Name) // require here makes it much easier to isolate differences than below
require.Equalf(t, c.Exchanges[i].CurrencyPairs, e.CurrencyPairs, "%s exchange Config CurrencyManager must match api response", e.Name)
require.Equalf(t, c.Exchanges[i], e, "%s exchange Config must match api response", e.Name) // require here makes it much easier to isolate differences than below
}
assert.Equal(t, c, responseConfig, "Config should match api response")
}
Expand Down

0 comments on commit 262c5d3

Please sign in to comment.