Skip to content

Commit

Permalink
iterate over networks instead of hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
edobry committed Dec 9, 2024
1 parent fab3b5a commit 76cf719
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions validation/standard/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ func TestConfigInitialization(t *testing.T) {
require.NotNil(t, Config.MultisigRoles, "Config.MultisigRoles should not be nil")

// Check individual network configurations
networks := []string{"mainnet", "sepolia"}
for _, network := range networks {
for network, params := range Config.Params {
t.Run(fmt.Sprintf("Params[%s]", network), func(t *testing.T) {
// Ensure network Params are populated
require.NotNil(t, Config.Params[network], "Config.Params[%s] should not be nil", network)
require.NoError(t, Config.Params[network].Check(), "Config.Params[%s] has invalid zero value", network)
require.NotNil(t, params, "Config.Params[%s] should not be nil", network)
require.NoError(t, params.Check(), "Config.Params[%s] has invalid zero value", network)
})

t.Run(fmt.Sprintf("MultisigRoles[%s]", network), func(t *testing.T) {
Expand Down

0 comments on commit 76cf719

Please sign in to comment.