4eadc823a9
* Move repository package to apps
* Move operators to grafana/grafana
* Go mod tidy
* Own package by git sync team for now
* Merged
* Do not use settings in local extra
* Remove dependency on webhook extra
* Hack to work around issue with secure contracts
* Sync Go modules
* Revert "Move operators to grafana/grafana"
This reverts commit 9f19b30a2e.
192 lines
5.2 KiB
Go
192 lines
5.2 KiB
Go
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
|
|
|
package repository
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
field "k8s.io/apimachinery/pkg/util/validation/field"
|
|
|
|
v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
|
|
)
|
|
|
|
// MockConfigRepository is an autogenerated mock type for the Repository type
|
|
type MockConfigRepository struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockConfigRepository_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockConfigRepository) EXPECT() *MockConfigRepository_Expecter {
|
|
return &MockConfigRepository_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Config provides a mock function with no fields
|
|
func (_m *MockConfigRepository) Config() *v0alpha1.Repository {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Config")
|
|
}
|
|
|
|
var r0 *v0alpha1.Repository
|
|
if rf, ok := ret.Get(0).(func() *v0alpha1.Repository); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v0alpha1.Repository)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockConfigRepository_Config_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Config'
|
|
type MockConfigRepository_Config_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Config is a helper method to define mock.On call
|
|
func (_e *MockConfigRepository_Expecter) Config() *MockConfigRepository_Config_Call {
|
|
return &MockConfigRepository_Config_Call{Call: _e.mock.On("Config")}
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Config_Call) Run(run func()) *MockConfigRepository_Config_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Config_Call) Return(_a0 *v0alpha1.Repository) *MockConfigRepository_Config_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Config_Call) RunAndReturn(run func() *v0alpha1.Repository) *MockConfigRepository_Config_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Test provides a mock function with given fields: ctx
|
|
func (_m *MockConfigRepository) Test(ctx context.Context) (*v0alpha1.TestResults, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Test")
|
|
}
|
|
|
|
var r0 *v0alpha1.TestResults
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) (*v0alpha1.TestResults, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) *v0alpha1.TestResults); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v0alpha1.TestResults)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockConfigRepository_Test_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Test'
|
|
type MockConfigRepository_Test_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Test is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *MockConfigRepository_Expecter) Test(ctx interface{}) *MockConfigRepository_Test_Call {
|
|
return &MockConfigRepository_Test_Call{Call: _e.mock.On("Test", ctx)}
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Test_Call) Run(run func(ctx context.Context)) *MockConfigRepository_Test_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Test_Call) Return(_a0 *v0alpha1.TestResults, _a1 error) *MockConfigRepository_Test_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Test_Call) RunAndReturn(run func(context.Context) (*v0alpha1.TestResults, error)) *MockConfigRepository_Test_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Validate provides a mock function with no fields
|
|
func (_m *MockConfigRepository) Validate() field.ErrorList {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Validate")
|
|
}
|
|
|
|
var r0 field.ErrorList
|
|
if rf, ok := ret.Get(0).(func() field.ErrorList); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(field.ErrorList)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockConfigRepository_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'
|
|
type MockConfigRepository_Validate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Validate is a helper method to define mock.On call
|
|
func (_e *MockConfigRepository_Expecter) Validate() *MockConfigRepository_Validate_Call {
|
|
return &MockConfigRepository_Validate_Call{Call: _e.mock.On("Validate")}
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Validate_Call) Run(run func()) *MockConfigRepository_Validate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Validate_Call) Return(_a0 field.ErrorList) *MockConfigRepository_Validate_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockConfigRepository_Validate_Call) RunAndReturn(run func() field.ErrorList) *MockConfigRepository_Validate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockConfigRepository creates a new instance of MockConfigRepository. 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 NewMockConfigRepository(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockConfigRepository {
|
|
mock := &MockConfigRepository{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|