diff --git a/testing/events.go b/testing/events.go index 9ebe7af9c90..96b9063759a 100644 --- a/testing/events.go +++ b/testing/events.go @@ -14,8 +14,6 @@ import ( channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" ) -type EventsMap map[string]map[string]string - // ParseClientIDFromEvents parses events emitted from a MsgCreateClient and returns the // client identifier. func ParseClientIDFromEvents(events []abci.Event) (string, error) { @@ -167,36 +165,6 @@ func ParseProposalIDFromEvents(events []abci.Event) (uint64, error) { return 0, fmt.Errorf("proposalID event attribute not found") } -// AssertEventsLegacy asserts that expected events are present in the actual events. -// Expected map needs to be a subset of actual events to pass. -func AssertEventsLegacy( - suite *testifysuite.Suite, - expected EventsMap, - actual []abci.Event, -) { - hasEvents := make(map[string]bool) - for eventType := range expected { - hasEvents[eventType] = false - } - - for _, event := range actual { - expEvent, eventFound := expected[event.Type] - if eventFound { - hasEvents[event.Type] = true - suite.Require().Len(event.Attributes, len(expEvent)) - for _, attr := range event.Attributes { - expValue, found := expEvent[attr.Key] - suite.Require().True(found) - suite.Require().Equal(expValue, attr.Value) - } - } - } - - for eventName, hasEvent := range hasEvents { - suite.Require().True(hasEvent, "event: %s was not found in events", eventName) - } -} - // AssertEvents asserts that expected events are present in the actual events. func AssertEvents( suite *testifysuite.Suite,