Add finish context to mockengine

This commit is contained in:
lash
2025-01-19 09:08:03 +00:00
parent 975720919c
commit 37973a6c9b

View File

@@ -10,7 +10,7 @@ type MockEngine struct {
InitFunc func(context.Context) (bool, error)
ExecFunc func(context.Context, []byte) (bool, error)
FlushFunc func(context.Context, io.Writer) (int, error)
FinishFunc func() error
FinishFunc func(context.Context) error
}
func (m *MockEngine) Init(ctx context.Context) (bool, error) {
@@ -25,6 +25,6 @@ func (m *MockEngine) Flush(ctx context.Context, w io.Writer) (int, error) {
return m.FlushFunc(ctx, w)
}
func (m *MockEngine) Finish() error {
return m.FinishFunc()
func (m *MockEngine) Finish(ctx context.Context) error {
return m.FinishFunc(ctx)
}