Files
grafana/pkg/registry/apis/provisioning/controller/mocks/StatusPatcher.go
2025-08-21 08:32:23 +00:00

56 lines
1.5 KiB
Go

// Code generated by mockery v2.52.4. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
)
// StatusPatcher is an autogenerated mock type for the StatusPatcher type
type StatusPatcher struct {
mock.Mock
}
// Patch provides a mock function with given fields: ctx, repo, patchOperations
func (_m *StatusPatcher) Patch(ctx context.Context, repo *v0alpha1.Repository, patchOperations ...map[string]interface{}) error {
_va := make([]interface{}, len(patchOperations))
for _i := range patchOperations {
_va[_i] = patchOperations[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, repo)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for Patch")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *v0alpha1.Repository, ...map[string]interface{}) error); ok {
r0 = rf(ctx, repo, patchOperations...)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewStatusPatcher creates a new instance of StatusPatcher. 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 NewStatusPatcher(t interface {
mock.TestingT
Cleanup(func())
}) *StatusPatcher {
mock := &StatusPatcher{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}