// Code generated by mockery v2.53.4. DO NOT EDIT. package migrations import ( context "context" legacy "github.com/grafana/grafana/pkg/registry/apis/dashboard/legacy" mock "github.com/stretchr/testify/mock" resourcepb "github.com/grafana/grafana/pkg/storage/unified/resourcepb" ) // MockUnifiedMigrator is an autogenerated mock type for the UnifiedMigrator type type MockUnifiedMigrator struct { mock.Mock } type MockUnifiedMigrator_Expecter struct { mock *mock.Mock } func (_m *MockUnifiedMigrator) EXPECT() *MockUnifiedMigrator_Expecter { return &MockUnifiedMigrator_Expecter{mock: &_m.Mock} } // Migrate provides a mock function with given fields: ctx, opts func (_m *MockUnifiedMigrator) Migrate(ctx context.Context, opts legacy.MigrateOptions) (*resourcepb.BulkResponse, error) { ret := _m.Called(ctx, opts) if len(ret) == 0 { panic("no return value specified for Migrate") } var r0 *resourcepb.BulkResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, legacy.MigrateOptions) (*resourcepb.BulkResponse, error)); ok { return rf(ctx, opts) } if rf, ok := ret.Get(0).(func(context.Context, legacy.MigrateOptions) *resourcepb.BulkResponse); ok { r0 = rf(ctx, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*resourcepb.BulkResponse) } } if rf, ok := ret.Get(1).(func(context.Context, legacy.MigrateOptions) error); ok { r1 = rf(ctx, opts) } else { r1 = ret.Error(1) } return r0, r1 } // MockUnifiedMigrator_Migrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrate' type MockUnifiedMigrator_Migrate_Call struct { *mock.Call } // Migrate is a helper method to define mock.On call // - ctx context.Context // - opts legacy.MigrateOptions func (_e *MockUnifiedMigrator_Expecter) Migrate(ctx interface{}, opts interface{}) *MockUnifiedMigrator_Migrate_Call { return &MockUnifiedMigrator_Migrate_Call{Call: _e.mock.On("Migrate", ctx, opts)} } func (_c *MockUnifiedMigrator_Migrate_Call) Run(run func(ctx context.Context, opts legacy.MigrateOptions)) *MockUnifiedMigrator_Migrate_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(legacy.MigrateOptions)) }) return _c } func (_c *MockUnifiedMigrator_Migrate_Call) Return(_a0 *resourcepb.BulkResponse, _a1 error) *MockUnifiedMigrator_Migrate_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockUnifiedMigrator_Migrate_Call) RunAndReturn(run func(context.Context, legacy.MigrateOptions) (*resourcepb.BulkResponse, error)) *MockUnifiedMigrator_Migrate_Call { _c.Call.Return(run) return _c } // NewMockUnifiedMigrator creates a new instance of MockUnifiedMigrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockUnifiedMigrator(t interface { mock.TestingT Cleanup(func()) }) *MockUnifiedMigrator { mock := &MockUnifiedMigrator{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }