26 lines
524 B
Go
26 lines
524 B
Go
package message
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"testing"
|
|
|
|
"git.asio.asia/nixevol/NixMsg/internal/app/port"
|
|
"git.asio.asia/nixevol/NixMsg/internal/protocol"
|
|
)
|
|
|
|
func TestStubSubmitNotImplemented(t *testing.T) {
|
|
s := NewStub()
|
|
_, err := s.Submit(context.Background(), "a", port.ConnInfo{}, &protocol.Send{})
|
|
if !errors.Is(err, ErrNotImplemented) {
|
|
t.Fatalf("got %v", err)
|
|
}
|
|
}
|
|
|
|
func TestStubRecoverNoop(t *testing.T) {
|
|
s := NewStub()
|
|
if err := s.RecoverOnStart(context.Background()); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|