Chore: Update mocks with recent mockery (#107816)

This commit is contained in:
Ryan McKinley
2025-07-09 09:15:34 +02:00
committed by GitHub
parent 39904d7b9b
commit 3f502f305d
95 changed files with 877 additions and 522 deletions
+24 -14
View File
@@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT.
// Code generated by mockery v2.53.4. DO NOT EDIT.
package query
@@ -9,9 +9,9 @@ import (
dtos "github.com/grafana/grafana/pkg/api/dtos"
mock "github.com/stretchr/testify/mock"
identity "github.com/grafana/grafana/pkg/apimachinery/identity"
mock "github.com/stretchr/testify/mock"
)
// FakeQueryService is an autogenerated mock type for the Service type
@@ -19,22 +19,29 @@ type FakeQueryService struct {
mock.Mock
}
// QueryData provides a mock function with given fields: ctx, _a1, skipDSCache, reqDTO
func (_m *FakeQueryService) QueryData(ctx context.Context, _a1 identity.Requester, skipDSCache bool, reqDTO dtos.MetricRequest) (*backend.QueryDataResponse, error) {
ret := _m.Called(ctx, _a1, skipDSCache, reqDTO)
// QueryData provides a mock function with given fields: ctx, user, skipDSCache, reqDTO
func (_m *FakeQueryService) QueryData(ctx context.Context, user identity.Requester, skipDSCache bool, reqDTO dtos.MetricRequest) (*backend.QueryDataResponse, error) {
ret := _m.Called(ctx, user, skipDSCache, reqDTO)
if len(ret) == 0 {
panic("no return value specified for QueryData")
}
var r0 *backend.QueryDataResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) (*backend.QueryDataResponse, error)); ok {
return rf(ctx, user, skipDSCache, reqDTO)
}
if rf, ok := ret.Get(0).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) *backend.QueryDataResponse); ok {
r0 = rf(ctx, _a1, skipDSCache, reqDTO)
r0 = rf(ctx, user, skipDSCache, reqDTO)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*backend.QueryDataResponse)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) error); ok {
r1 = rf(ctx, _a1, skipDSCache, reqDTO)
r1 = rf(ctx, user, skipDSCache, reqDTO)
} else {
r1 = ret.Error(1)
}
@@ -46,6 +53,10 @@ func (_m *FakeQueryService) QueryData(ctx context.Context, _a1 identity.Requeste
func (_m *FakeQueryService) Run(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for Run")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
@@ -56,13 +67,12 @@ func (_m *FakeQueryService) Run(ctx context.Context) error {
return r0
}
type mockConstructorTestingTNewFakeQueryService interface {
// NewFakeQueryService creates a new instance of FakeQueryService. 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 NewFakeQueryService(t interface {
mock.TestingT
Cleanup(func())
}
// NewFakeQueryService creates a new instance of FakeQueryService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewFakeQueryService(t mockConstructorTestingTNewFakeQueryService) *FakeQueryService {
}) *FakeQueryService {
mock := &FakeQueryService{}
mock.Mock.Test(t)