From 37973a6c9bb525f3643614a09a9f30e5bfeed6ff Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 19 Jan 2025 09:08:03 +0000 Subject: [PATCH] Add finish context to mockengine --- testutil/mocks/httpmocks/enginemock.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testutil/mocks/httpmocks/enginemock.go b/testutil/mocks/httpmocks/enginemock.go index 12d07f4..9c401cf 100644 --- a/testutil/mocks/httpmocks/enginemock.go +++ b/testutil/mocks/httpmocks/enginemock.go @@ -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) }