Skip to content

Commit

Permalink
provider: fix init module_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Oct 13, 2023
1 parent 2e7f946 commit 0735fca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions x/ccv/provider/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,21 @@ func TestInitGenesis(t *testing.T) {
continue // Nothing else to verify
}

appModule.InitGenesis(ctx, cdc, jsonBytes)

numStatesCounted := 0
for _, state := range tc.consumerStates {
numStatesCounted += 1
channelID, found := providerKeeper.GetChainToChannel(ctx, state.ChainId)
require.True(t, found)
require.Equal(t, state.ChannelId, channelID)

chainID, found := providerKeeper.GetChannelToChain(ctx, state.ChannelId)
require.True(t, found)
require.Equal(t, state.ChainId, chainID)
}
require.Equal(t, len(tc.consumerStates), numStatesCounted)

// Expect slash meter to be initialized to it's allowance value
// (replenish fraction * mocked value defined above)
slashMeter := providerKeeper.GetSlashMeter(ctx)
Expand Down

0 comments on commit 0735fca

Please sign in to comment.