// Code generated by mockery v2.53.4. DO NOT EDIT. package jobs import ( context "context" v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1" mock "github.com/stretchr/testify/mock" ) // MockQueue is an autogenerated mock type for the Queue type type MockQueue struct { mock.Mock } type MockQueue_Expecter struct { mock *mock.Mock } func (_m *MockQueue) EXPECT() *MockQueue_Expecter { return &MockQueue_Expecter{mock: &_m.Mock} } // Insert provides a mock function with given fields: ctx, namespace, spec func (_m *MockQueue) Insert(ctx context.Context, namespace string, spec v0alpha1.JobSpec) (*v0alpha1.Job, error) { ret := _m.Called(ctx, namespace, spec) if len(ret) == 0 { panic("no return value specified for Insert") } var r0 *v0alpha1.Job var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, v0alpha1.JobSpec) (*v0alpha1.Job, error)); ok { return rf(ctx, namespace, spec) } if rf, ok := ret.Get(0).(func(context.Context, string, v0alpha1.JobSpec) *v0alpha1.Job); ok { r0 = rf(ctx, namespace, spec) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v0alpha1.Job) } } if rf, ok := ret.Get(1).(func(context.Context, string, v0alpha1.JobSpec) error); ok { r1 = rf(ctx, namespace, spec) } else { r1 = ret.Error(1) } return r0, r1 } // MockQueue_Insert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Insert' type MockQueue_Insert_Call struct { *mock.Call } // Insert is a helper method to define mock.On call // - ctx context.Context // - namespace string // - spec v0alpha1.JobSpec func (_e *MockQueue_Expecter) Insert(ctx interface{}, namespace interface{}, spec interface{}) *MockQueue_Insert_Call { return &MockQueue_Insert_Call{Call: _e.mock.On("Insert", ctx, namespace, spec)} } func (_c *MockQueue_Insert_Call) Run(run func(ctx context.Context, namespace string, spec v0alpha1.JobSpec)) *MockQueue_Insert_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string), args[2].(v0alpha1.JobSpec)) }) return _c } func (_c *MockQueue_Insert_Call) Return(_a0 *v0alpha1.Job, _a1 error) *MockQueue_Insert_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockQueue_Insert_Call) RunAndReturn(run func(context.Context, string, v0alpha1.JobSpec) (*v0alpha1.Job, error)) *MockQueue_Insert_Call { _c.Call.Return(run) return _c } // NewMockQueue creates a new instance of MockQueue. 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 NewMockQueue(t interface { mock.TestingT Cleanup(func()) }) *MockQueue { mock := &MockQueue{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }