test: fix mock generation

This commit is contained in:
Derrick Hammer 2024-01-08 01:16:20 -05:00
parent adef9b1eb4
commit 6a474c92dc
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
4 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import (
"github.com/vmihailenco/msgpack/v5" "github.com/vmihailenco/msgpack/v5"
) )
//go:generate mockgen -source=incoming_message.go -destination=../mocks/base/incoming_message.go -package=base //go:generate mockgen -source=base.go -destination=../mocks/base/base.go -package=base
type IncomingMessage interface { type IncomingMessage interface {
HandleMessage(node interfaces.Node, peer net.Peer, verifyId bool) error HandleMessage(node interfaces.Node, peer net.Peer, verifyId bool) error

View File

@ -6,6 +6,8 @@ var (
_ EncodeableMessage = (*EncodeableMessageImpl)(nil) _ EncodeableMessage = (*EncodeableMessageImpl)(nil)
) )
//go:generate mockgen -source=encodeable_message.go -destination=../mocks/base/encodeable_message.go -package=base
type EncodeableMessage interface { type EncodeableMessage interface {
ToMessage() (message []byte, err error) ToMessage() (message []byte, err error)
msgpack.CustomEncoder msgpack.CustomEncoder

View File

@ -10,6 +10,8 @@ import (
"net/url" "net/url"
) )
//go:generate mockgen -source=incoming_message.go -destination=../../mocks/base/incoming_message.go -package=base
var _ msgpack.CustomDecoder = (*IncomingMessageImpl)(nil) var _ msgpack.CustomDecoder = (*IncomingMessageImpl)(nil)
var _ IncomingMessage = (*IncomingMessageImpl)(nil) var _ IncomingMessage = (*IncomingMessageImpl)(nil)
var _ IncomingMessageTyped = (*IncomingMessageImpl)(nil) var _ IncomingMessageTyped = (*IncomingMessageImpl)(nil)

View File

@ -1,5 +1,7 @@
package base package base
//go:generate mockgen -source=signed.go -destination=../../mocks/base/signed.go -package=base -aux_files=git.lumeweb.com/LumeWeb/libs5-go/protocol/base=base.go
type SignedIncomingMessage interface { type SignedIncomingMessage interface {
IncomingMessage IncomingMessage
} }