Skip to content

Commit

Permalink
add some TODO comments for test
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Apr 18, 2024
1 parent a723d1a commit dc84085
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions x/oracle/keeper/aggregator/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func initAggregatorContext4Test() *AggregatorContext {
return agc
}

// TODO: remove monkey patch for test
func patchBlockHeight(h int64) *monkey.PatchGuard {
return monkey.PatchInstanceMethod(reflect.TypeOf(sdk.Context{}), "BlockHeight", func(sdk.Context) int64 {
return h
Expand Down
1 change: 1 addition & 0 deletions x/oracle/keeper/msg_server_create_price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var _ = Describe("MsgCreatePrice", func() {
validatorC.EXPECT().GetOperator().Return(operator2)
validatorC.EXPECT().GetOperator().Return(operator3)

//TODO: remove monkey patch for test
monkey.PatchInstanceMethod(reflect.TypeOf(stakingKeeper.Keeper{}), "IterateBondedValidatorsByPower", func(k stakingKeeper.Keeper, ctx sdk.Context, f func(index int64, validator stakingtypes.ValidatorI) bool) {
f(0, validatorC)
f(0, validatorC)
Expand Down

0 comments on commit dc84085

Please sign in to comment.