msgmux: fix arg expectation for mock in unit test

This commit is contained in:
Olaoluwa Osuntokun
2025-03-04 18:18:02 -08:00
parent 8d9ed0ca73
commit 720d98cc15
3 changed files with 4 additions and 2 deletions

View File

@@ -244,7 +244,7 @@ func (p *MultiMsgRouter) msgRouter(ctx context.Context) {
var err error
if !couldSend {
log.Tracef("MsgRouter: unable to route "+
"msg %T", msg)
"msg %T", msg.Message)
err = ErrUnableToRouteMsg
}

View File

@@ -26,7 +26,7 @@ func (m *mockEndpoint) CanHandle(msg PeerMsg) bool {
}
func (m *mockEndpoint) SendMessage(ctx context.Context, msg PeerMsg) bool {
args := m.Called(msg)
args := m.Called(ctx, msg)
return args.Bool(0)
}