diff --git a/go-runtime/ftl/ftltest/mock.go b/go-runtime/ftl/ftltest/mock.go index f56276de88..684250c786 100644 --- a/go-runtime/ftl/ftltest/mock.go +++ b/go-runtime/ftl/ftltest/mock.go @@ -12,23 +12,23 @@ import ( type mockFunc func(ctx context.Context, req any) (resp any, err error) -// mockProvider keeps a mapping of verb references to mock functions. +// mockVerbProvider keeps a mapping of verb references to mock functions. // // It implements the CallOverrider interface to intercept calls with the mock functions. -type mockProvider struct { +type mockVerbProvider struct { mocks map[ftl.Ref]mockFunc } -var _ = (ftl.CallOverrider)(&mockProvider{}) +var _ = (ftl.CallOverrider)(&mockVerbProvider{}) -func newMockProvider() *mockProvider { - provider := &mockProvider{ +func newMockVerbProvider() *mockVerbProvider { + provider := &mockVerbProvider{ mocks: map[ftl.Ref]mockFunc{}, } return provider } -func (m *mockProvider) OverrideCall(ctx context.Context, ref ftl.Ref, req any) (override bool, resp any, err error) { +func (m *mockVerbProvider) OverrideCall(ctx context.Context, ref ftl.Ref, req any) (override bool, resp any, err error) { mock, ok := m.mocks[ref] if ok { resp, err = mock(ctx, req)