-
Notifications
You must be signed in to change notification settings - Fork 608
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 <[email protected]> * Update x/gamm/keeper/msg_server_test.go Co-authored-by: Adam Tucker <[email protected]> * Update x/gamm/keeper/pool_service_test.go Co-authored-by: Adam Tucker <[email protected]> * shareIn * update event comments * changelog * Update CHANGELOG.md Co-authored-by: Aleksandr Bezobchuk <[email protected]> * add docs Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> (cherry picked from commit 40f19a3) # Conflicts: # CHANGELOG.md # x/gamm/keeper/pool_service_test.go # x/superfluid/keeper/unpool_test.go
- Loading branch information
1 parent
681ffae
commit f74bc21
Showing
9 changed files
with
597 additions
and
84 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
Oops, something went wrong.