63 lines
1.7 KiB
Go
63 lines
1.7 KiB
Go
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
repository "github.com/grafana/grafana/pkg/registry/apis/provisioning/repository"
|
|
|
|
v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
|
|
)
|
|
|
|
// RepositoryTester is an autogenerated mock type for the RepositoryTester type
|
|
type RepositoryTester struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// TestRepository provides a mock function with given fields: ctx, repo
|
|
func (_m *RepositoryTester) TestRepository(ctx context.Context, repo repository.Repository) (*v0alpha1.TestResults, error) {
|
|
ret := _m.Called(ctx, repo)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TestRepository")
|
|
}
|
|
|
|
var r0 *v0alpha1.TestResults
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, repository.Repository) (*v0alpha1.TestResults, error)); ok {
|
|
return rf(ctx, repo)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, repository.Repository) *v0alpha1.TestResults); ok {
|
|
r0 = rf(ctx, repo)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v0alpha1.TestResults)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, repository.Repository) error); ok {
|
|
r1 = rf(ctx, repo)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewRepositoryTester creates a new instance of RepositoryTester. 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 NewRepositoryTester(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *RepositoryTester {
|
|
mock := &RepositoryTester{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|