Skip to content

Commit

Permalink
add details description on GetMsgServer's use (#558)
Browse files Browse the repository at this point in the history
Closes: #XXX

## Context and purpose of the change



Adding description on uses of GetMsgServer in keeper_test.go for module that use it.

## Brief Changelog




## Author's Checklist

I have...

- [x] Run and PASSED locally all Stride integration tests
- [ ] If the change is contentful, I either:
    - [ ] Added a new unit test OR 
    - [ ] Added test cases to existing unit tests
- [ ] OR this change is a trivial rework / code cleanup without any test coverage

If skipped any of the tests above, explain.


## Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] manually tested (if applicable)
- [ ] confirmed the author wrote unit tests for new logic
- [ ] reviewed documentation exists and is accurate


## Documentation and Release Note

  - [ ] Does this pull request introduce a new feature or user-facing behavior changes? 
  - [ ] Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`?
  - [ ] This pull request updates existing proto field values (and require a backend and frontend migration)? 
  - [ ] Does this pull request change existing proto field names (and require a frontend migration)?
  How is the feature or change documented? 
      - [ ] not applicable
      - [ ] jira ticket `XXX` 
      - [ ] specification (`x/<module>/spec/`) 
      - [ ] README.md 
      - [ ] not documented
  • Loading branch information
hoangdv2429 authored Jan 5, 2023
1 parent b06abe3 commit edb90e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/interchainquery/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ func (s *KeeperTestSuite) SetupTest() {
s.Setup()
}

// Dynamically gets the MsgServer for this module's keeper
// this function must be used so that the MsgServer is always created with the most updated App context
// which can change depending on the type of test
// (e.g. tests with only one Stride chain vs tests with multiple chains and IBC support)
func (s *KeeperTestSuite) GetMsgServer() types.MsgServer {
return keeper.NewMsgServerImpl(s.App.InterchainqueryKeeper)
}
Expand Down
4 changes: 4 additions & 0 deletions x/records/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ func (s *KeeperTestSuite) SetupTest() {
s.Setup()
}

// Dynamically gets the MsgServer for this module's keeper
// this function must be used so that the MsgServer is always created with the most updated App context
// which can change depending on the type of test
// (e.g. tests with only one Stride chain vs tests with multiple chains and IBC support)
func (s *KeeperTestSuite) GetMsgServer() types.MsgServer {
return keeper.NewMsgServerImpl(s.App.RecordsKeeper)
}
Expand Down
4 changes: 4 additions & 0 deletions x/stakeibc/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ func (s *KeeperTestSuite) SetupTest() {
s.Setup()
}

// Dynamically gets the MsgServer for this module's keeper
// this function must be used so that the MsgServer is always created with the most updated App context
// which can change depending on the type of test
// (e.g. tests with only one Stride chain vs tests with multiple chains and IBC support)
func (s *KeeperTestSuite) GetMsgServer() types.MsgServer {
return keeper.NewMsgServerImpl(s.App.StakeibcKeeper)
}
Expand Down

0 comments on commit edb90e9

Please sign in to comment.