-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(x/gamm): remove liquidity events (#2186)
* test(x/gamm): remove liquidity events * remove capacity pre-allocation * Update x/gamm/keeper/internal/events/emit_test.go Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/gamm/keeper/msg_server_test.go Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/gamm/keeper/pool_service_test.go Co-authored-by: Adam Tucker <adam@osmosis.team> * shareIn * update event comments * changelog * Update CHANGELOG.md Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * add docs Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
- Loading branch information
1 parent
4d50629
commit 40f19a3
Showing
9 changed files
with
333 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package apptesting | ||
|
||
import sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
// AssertEventEmitted asserts that ctx's event manager has emitted the given number of events | ||
// of the given type. | ||
func (s *KeeperTestHelper) AssertEventEmitted(ctx sdk.Context, eventTypeExpected string, numEventsExpected int) { | ||
allEvents := ctx.EventManager().Events() | ||
// filter out other events | ||
actualEvents := make([]sdk.Event, 0) | ||
for _, event := range allEvents { | ||
if event.Type == eventTypeExpected { | ||
actualEvents = append(actualEvents, event) | ||
} | ||
} | ||
s.Equal(numEventsExpected, len(actualEvents)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.