Skip to content

Commit

Permalink
changes for merging #276
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Aug 22, 2022
1 parent 4326ce5 commit 9103708
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x/ccv/consumer/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (suite *KeeperTestSuite) SetupTest() {
suite.Require().True(found, "consumer client not found")
suite.path.EndpointB.ClientID = consumerClient
// - set consumer endpoint's clientID
providerClient, found := suite.consumerChain.App.(*appConsumer.App).ConsumerKeeper.GetProviderClient(suite.consumerChain.GetContext())
providerClient, found := suite.consumerChain.App.(*appConsumer.App).ConsumerKeeper.GetProviderClientID(suite.consumerChain.GetContext())
suite.Require().True(found, "provider client not found")
suite.path.EndpointA.ClientID = providerClient
// - client config
Expand Down Expand Up @@ -149,19 +149,19 @@ func TestUnbondingTime(t *testing.T) {

// Tests that the provider client managed by the consumer keeper matches the client keeper's client state
func (suite *KeeperTestSuite) TestProviderClientMatches() {
providerClientID, ok := suite.consumerChain.App.(*appConsumer.App).ConsumerKeeper.GetProviderClient(suite.ctx)
providerClientID, ok := suite.consumerChain.App.(*appConsumer.App).ConsumerKeeper.GetProviderClientID(suite.ctx)
suite.Require().True(ok)

clientState, _ := suite.consumerChain.App.GetIBCKeeper().ClientKeeper.GetClientState(suite.ctx, providerClientID)
suite.Require().Equal(suite.providerClient, clientState, "stored client state does not match genesis provider client")
}

func TestProviderClient(t *testing.T) {
func TestProviderClientID(t *testing.T) {
consumerKeeper, ctx := testkeeper.GetConsumerKeeperAndCtx(t)
_, ok := consumerKeeper.GetProviderClient(ctx)
_, ok := consumerKeeper.GetProviderClientID(ctx)
require.False(t, ok)
consumerKeeper.SetProviderClient(ctx, "someClientID")
clientID, ok := consumerKeeper.GetProviderClient(ctx)
consumerKeeper.SetProviderClientID(ctx, "someClientID")
clientID, ok := consumerKeeper.GetProviderClientID(ctx)
require.True(t, ok)
require.Equal(t, "someClientID", clientID)
}
Expand Down

0 comments on commit 9103708

Please sign in to comment.