Skip to content

Commit

Permalink
chore: follow up for testing rest of methods on 07-tendermint light c…
Browse files Browse the repository at this point in the history
…lient module (#6135)

* move tests from client state to lcm, use lcm entry point

* linter

* update Initialise test + coverage

* linter

* import naming

* update for pr review

* followup to lcm testing pr

* linter

* update: use lcm entrypoint

* update: use lcm entrypoint

* linter

* linter

* merge artifact

* add single test for panics cases

* a bit of linting a day keeps the doctor away

* more linting

* fix test

* test: fixup testing logic

* nit: use errors.New() where no args are present for formatting

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Co-authored-by: Colin Axnér <25233464+colin-axner@users.noreply.github.com>
  • Loading branch information
4 people committed May 22, 2024
1 parent 5069ab6 commit 6993618
Show file tree
Hide file tree
Showing 6 changed files with 730 additions and 470 deletions.
4 changes: 3 additions & 1 deletion modules/core/02-client/keeper/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ func (suite *KeeperTestSuite) TestUpdateClientEventEmission() {
path := ibctesting.NewPath(suite.chainA, suite.chainB)
path.SetupClients()

trustedHeight := path.EndpointA.GetClientState().(*ibctm.ClientState).LatestHeight
tmClientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState)
suite.Require().True(ok)
trustedHeight := tmClientState.LatestHeight
header, err := path.EndpointA.Counterparty.Chain.IBCClientHeader(path.EndpointA.Counterparty.Chain.LatestCommittedHeader, trustedHeight)
suite.Require().NoError(err)

Expand Down
4 changes: 3 additions & 1 deletion modules/core/02-client/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,9 @@ func (suite *KeeperTestSuite) TestIBCSoftwareUpgrade() {

path := ibctesting.NewPath(suite.chainA, suite.chainB)
path.SetupClients()
upgradedClientState = path.EndpointA.GetClientState().(*ibctm.ClientState).ZeroCustomFields()
tmClientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState)
suite.Require().True(ok)
upgradedClientState = tmClientState.ZeroCustomFields()

// use height 1000 to distinguish from old plan
plan = upgradetypes.Plan{
Expand Down

0 comments on commit 6993618

Please sign in to comment.