Chore: Update mocks with recent mockery (#107816)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.6. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package filestorage
|
||||
|
||||
@@ -17,6 +17,10 @@ type MockFileStorage struct {
|
||||
func (_m *MockFileStorage) CreateFolder(ctx context.Context, path string) error {
|
||||
ret := _m.Called(ctx, path)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateFolder")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, path)
|
||||
@@ -31,6 +35,10 @@ func (_m *MockFileStorage) CreateFolder(ctx context.Context, path string) error
|
||||
func (_m *MockFileStorage) Delete(ctx context.Context, path string) error {
|
||||
ret := _m.Called(ctx, path)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, path)
|
||||
@@ -45,6 +53,10 @@ func (_m *MockFileStorage) Delete(ctx context.Context, path string) error {
|
||||
func (_m *MockFileStorage) DeleteFolder(ctx context.Context, path string, options *DeleteFolderOptions) error {
|
||||
ret := _m.Called(ctx, path, options)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteFolder")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, *DeleteFolderOptions) error); ok {
|
||||
r0 = rf(ctx, path, options)
|
||||
@@ -59,7 +71,16 @@ func (_m *MockFileStorage) DeleteFolder(ctx context.Context, path string, option
|
||||
func (_m *MockFileStorage) Get(ctx context.Context, path string, options *GetFileOptions) (*File, bool, error) {
|
||||
ret := _m.Called(ctx, path, options)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *File
|
||||
var r1 bool
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, *GetFileOptions) (*File, bool, error)); ok {
|
||||
return rf(ctx, path, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, *GetFileOptions) *File); ok {
|
||||
r0 = rf(ctx, path, options)
|
||||
} else {
|
||||
@@ -68,14 +89,12 @@ func (_m *MockFileStorage) Get(ctx context.Context, path string, options *GetFil
|
||||
}
|
||||
}
|
||||
|
||||
var r1 bool
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, *GetFileOptions) bool); ok {
|
||||
r1 = rf(ctx, path, options)
|
||||
} else {
|
||||
r1 = ret.Get(1).(bool)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(context.Context, string, *GetFileOptions) error); ok {
|
||||
r2 = rf(ctx, path, options)
|
||||
} else {
|
||||
@@ -89,7 +108,15 @@ func (_m *MockFileStorage) Get(ctx context.Context, path string, options *GetFil
|
||||
func (_m *MockFileStorage) List(ctx context.Context, folderPath string, paging *Paging, options *ListOptions) (*ListResponse, error) {
|
||||
ret := _m.Called(ctx, folderPath, paging, options)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 *ListResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, *Paging, *ListOptions) (*ListResponse, error)); ok {
|
||||
return rf(ctx, folderPath, paging, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, *Paging, *ListOptions) *ListResponse); ok {
|
||||
r0 = rf(ctx, folderPath, paging, options)
|
||||
} else {
|
||||
@@ -98,7 +125,6 @@ func (_m *MockFileStorage) List(ctx context.Context, folderPath string, paging *
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, *Paging, *ListOptions) error); ok {
|
||||
r1 = rf(ctx, folderPath, paging, options)
|
||||
} else {
|
||||
@@ -112,6 +138,10 @@ func (_m *MockFileStorage) List(ctx context.Context, folderPath string, paging *
|
||||
func (_m *MockFileStorage) Upsert(ctx context.Context, command *UpsertFileCommand) error {
|
||||
ret := _m.Called(ctx, command)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Upsert")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *UpsertFileCommand) error); ok {
|
||||
r0 = rf(ctx, command)
|
||||
@@ -122,10 +152,14 @@ func (_m *MockFileStorage) Upsert(ctx context.Context, command *UpsertFileComman
|
||||
return r0
|
||||
}
|
||||
|
||||
// close provides a mock function with given fields:
|
||||
// close provides a mock function with no fields
|
||||
func (_m *MockFileStorage) close() error {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for close")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
@@ -135,3 +169,17 @@ func (_m *MockFileStorage) close() error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewMockFileStorage creates a new instance of MockFileStorage. 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 NewMockFileStorage(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *MockFileStorage {
|
||||
mock := &MockFileStorage{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.27.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package socialtest
|
||||
|
||||
@@ -31,6 +31,10 @@ func (_m *MockSocialConnector) AuthCodeURL(state string, opts ...oauth2.AuthCode
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AuthCodeURL")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, ...oauth2.AuthCodeOption) string); ok {
|
||||
r0 = rf(state, opts...)
|
||||
@@ -45,6 +49,10 @@ func (_m *MockSocialConnector) AuthCodeURL(state string, opts ...oauth2.AuthCode
|
||||
func (_m *MockSocialConnector) Client(ctx context.Context, t *oauth2.Token) *http.Client {
|
||||
ret := _m.Called(ctx, t)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Client")
|
||||
}
|
||||
|
||||
var r0 *http.Client
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *oauth2.Token) *http.Client); ok {
|
||||
r0 = rf(ctx, t)
|
||||
@@ -68,6 +76,10 @@ func (_m *MockSocialConnector) Exchange(ctx context.Context, code string, authOp
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Exchange")
|
||||
}
|
||||
|
||||
var r0 *oauth2.Token
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...oauth2.AuthCodeOption) (*oauth2.Token, error)); ok {
|
||||
@@ -90,10 +102,14 @@ func (_m *MockSocialConnector) Exchange(ctx context.Context, code string, authOp
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetOAuthInfo provides a mock function with given fields:
|
||||
// GetOAuthInfo provides a mock function with no fields
|
||||
func (_m *MockSocialConnector) GetOAuthInfo() *social.OAuthInfo {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetOAuthInfo")
|
||||
}
|
||||
|
||||
var r0 *social.OAuthInfo
|
||||
if rf, ok := ret.Get(0).(func() *social.OAuthInfo); ok {
|
||||
r0 = rf()
|
||||
@@ -110,6 +126,10 @@ func (_m *MockSocialConnector) GetOAuthInfo() *social.OAuthInfo {
|
||||
func (_m *MockSocialConnector) IsEmailAllowed(email string) bool {
|
||||
ret := _m.Called(email)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsEmailAllowed")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
||||
r0 = rf(email)
|
||||
@@ -120,10 +140,14 @@ func (_m *MockSocialConnector) IsEmailAllowed(email string) bool {
|
||||
return r0
|
||||
}
|
||||
|
||||
// IsSignupAllowed provides a mock function with given fields:
|
||||
// IsSignupAllowed provides a mock function with no fields
|
||||
func (_m *MockSocialConnector) IsSignupAllowed() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsSignupAllowed")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@@ -138,6 +162,10 @@ func (_m *MockSocialConnector) IsSignupAllowed() bool {
|
||||
func (_m *MockSocialConnector) SupportBundleContent(_a0 *bytes.Buffer) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SupportBundleContent")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(*bytes.Buffer) error); ok {
|
||||
r0 = rf(_a0)
|
||||
@@ -152,6 +180,10 @@ func (_m *MockSocialConnector) SupportBundleContent(_a0 *bytes.Buffer) error {
|
||||
func (_m *MockSocialConnector) TokenSource(ctx context.Context, t *oauth2.Token) oauth2.TokenSource {
|
||||
ret := _m.Called(ctx, t)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for TokenSource")
|
||||
}
|
||||
|
||||
var r0 oauth2.TokenSource
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *oauth2.Token) oauth2.TokenSource); ok {
|
||||
r0 = rf(ctx, t)
|
||||
@@ -168,6 +200,10 @@ func (_m *MockSocialConnector) TokenSource(ctx context.Context, t *oauth2.Token)
|
||||
func (_m *MockSocialConnector) UserInfo(ctx context.Context, client *http.Client, token *oauth2.Token) (*social.BasicUserInfo, error) {
|
||||
ret := _m.Called(ctx, client, token)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UserInfo")
|
||||
}
|
||||
|
||||
var r0 *social.BasicUserInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *http.Client, *oauth2.Token) (*social.BasicUserInfo, error)); ok {
|
||||
@@ -190,13 +226,12 @@ func (_m *MockSocialConnector) UserInfo(ctx context.Context, client *http.Client
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMockSocialConnector interface {
|
||||
// NewMockSocialConnector creates a new instance of MockSocialConnector. 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 NewMockSocialConnector(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMockSocialConnector creates a new instance of MockSocialConnector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMockSocialConnector(t mockConstructorTestingTNewMockSocialConnector) *MockSocialConnector {
|
||||
}) *MockSocialConnector {
|
||||
mock := &MockSocialConnector{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package legacy
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
"github.com/grafana/grafana/pkg/storage/unified/resourcepb"
|
||||
|
||||
resourcepb "github.com/grafana/grafana/pkg/storage/unified/resourcepb"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package export
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package export
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/grafana/grafana/pkg/storage/unified/resourcepb"
|
||||
resourcepb "github.com/grafana/grafana/pkg/storage/unified/resourcepb"
|
||||
)
|
||||
|
||||
// MockBulkStoreClient is an autogenerated mock type for the BulkStoreClient type
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package sync
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package sync
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package sync
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package sync
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package sync
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package jobs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package github
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package github
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package github
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package gogit
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package gogit
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
@@ -26,64 +26,6 @@ func (_m *MockRepositoryResources) EXPECT() *MockRepositoryResources_Expecter {
|
||||
return &MockRepositoryResources_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// WriteResourceFileFromObject provides a mock function with given fields: ctx, obj, options
|
||||
func (_m *MockRepositoryResources) WriteResourceFileFromObject(ctx context.Context, obj *unstructured.Unstructured, options WriteOptions) (string, error) {
|
||||
ret := _m.Called(ctx, obj, options)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for WriteResourceFileFromObject")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, WriteOptions) (string, error)); ok {
|
||||
return rf(ctx, obj, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, WriteOptions) string); ok {
|
||||
r0 = rf(ctx, obj, options)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *unstructured.Unstructured, WriteOptions) error); ok {
|
||||
r1 = rf(ctx, obj, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockRepositoryResources_WriteResourceFileFromObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteResourceFileFromObject'
|
||||
type MockRepositoryResources_WriteResourceFileFromObject_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// WriteResourceFileFromObject is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - obj *unstructured.Unstructured
|
||||
// - options WriteOptions
|
||||
func (_e *MockRepositoryResources_Expecter) WriteResourceFileFromObject(ctx interface{}, obj interface{}, options interface{}) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
return &MockRepositoryResources_WriteResourceFileFromObject_Call{Call: _e.mock.On("WriteResourceFileFromObject", ctx, obj, options)}
|
||||
}
|
||||
|
||||
func (_c *MockRepositoryResources_WriteResourceFileFromObject_Call) Run(run func(ctx context.Context, obj *unstructured.Unstructured, options WriteOptions)) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*unstructured.Unstructured), args[2].(WriteOptions))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockRepositoryResources_WriteResourceFileFromObject_Call) Return(_a0 string, _a1 error) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockRepositoryResources_WriteResourceFileFromObject_Call) RunAndReturn(run func(context.Context, *unstructured.Unstructured, WriteOptions) (string, error)) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// EnsureFolderExists provides a mock function with given fields: ctx, folder, parentID
|
||||
func (_m *MockRepositoryResources) EnsureFolderExists(ctx context.Context, folder Folder, parentID string) error {
|
||||
ret := _m.Called(ctx, folder, parentID)
|
||||
@@ -520,6 +462,64 @@ func (_c *MockRepositoryResources_Stats_Call) RunAndReturn(run func(context.Cont
|
||||
return _c
|
||||
}
|
||||
|
||||
// WriteResourceFileFromObject provides a mock function with given fields: ctx, obj, options
|
||||
func (_m *MockRepositoryResources) WriteResourceFileFromObject(ctx context.Context, obj *unstructured.Unstructured, options WriteOptions) (string, error) {
|
||||
ret := _m.Called(ctx, obj, options)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for WriteResourceFileFromObject")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, WriteOptions) (string, error)); ok {
|
||||
return rf(ctx, obj, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, WriteOptions) string); ok {
|
||||
r0 = rf(ctx, obj, options)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *unstructured.Unstructured, WriteOptions) error); ok {
|
||||
r1 = rf(ctx, obj, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockRepositoryResources_WriteResourceFileFromObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteResourceFileFromObject'
|
||||
type MockRepositoryResources_WriteResourceFileFromObject_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// WriteResourceFileFromObject is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - obj *unstructured.Unstructured
|
||||
// - options WriteOptions
|
||||
func (_e *MockRepositoryResources_Expecter) WriteResourceFileFromObject(ctx interface{}, obj interface{}, options interface{}) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
return &MockRepositoryResources_WriteResourceFileFromObject_Call{Call: _e.mock.On("WriteResourceFileFromObject", ctx, obj, options)}
|
||||
}
|
||||
|
||||
func (_c *MockRepositoryResources_WriteResourceFileFromObject_Call) Run(run func(ctx context.Context, obj *unstructured.Unstructured, options WriteOptions)) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*unstructured.Unstructured), args[2].(WriteOptions))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockRepositoryResources_WriteResourceFileFromObject_Call) Return(_a0 string, _a1 error) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockRepositoryResources_WriteResourceFileFromObject_Call) RunAndReturn(run func(context.Context, *unstructured.Unstructured, WriteOptions) (string, error)) *MockRepositoryResources_WriteResourceFileFromObject_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// WriteResourceFromFile provides a mock function with given fields: ctx, path, ref
|
||||
func (_m *MockRepositoryResources) WriteResourceFromFile(ctx context.Context, path string, ref string) (string, schema.GroupVersionKind, error) {
|
||||
ret := _m.Called(ctx, path, ref)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package signature
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package signature
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package resources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package secrets
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package pullrequest
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/grafana/grafana/pkg/storage/unified/resourcepb"
|
||||
resourcepb "github.com/grafana/grafana/pkg/storage/unified/resourcepb"
|
||||
)
|
||||
|
||||
// MockBlobStoreClient is an autogenerated mock type for the BlobStoreClient type
|
||||
@@ -69,7 +69,7 @@ type MockBlobStoreClient_PutBlob_Call struct {
|
||||
|
||||
// PutBlob is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - in *resource.PutBlobRequest
|
||||
// - in *resourcepb.PutBlobRequest
|
||||
// - opts ...grpc.CallOption
|
||||
func (_e *MockBlobStoreClient_Expecter) PutBlob(ctx interface{}, in interface{}, opts ...interface{}) *MockBlobStoreClient_PutBlob_Call {
|
||||
return &MockBlobStoreClient_PutBlob_Call{Call: _e.mock.On("PutBlob",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package pullrequest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package pullrequest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package pullrequest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package pullrequest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package actest
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Code generated by mockery v2.12.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package annotations
|
||||
|
||||
import (
|
||||
context "context"
|
||||
testing "testing"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
@@ -18,6 +17,10 @@ type FakeAnnotationsRepo struct {
|
||||
func (_m *FakeAnnotationsRepo) Delete(ctx context.Context, params *DeleteParams) error {
|
||||
ret := _m.Called(ctx, params)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *DeleteParams) error); ok {
|
||||
r0 = rf(ctx, params)
|
||||
@@ -32,7 +35,15 @@ func (_m *FakeAnnotationsRepo) Delete(ctx context.Context, params *DeleteParams)
|
||||
func (_m *FakeAnnotationsRepo) Find(ctx context.Context, query *ItemQuery) ([]*ItemDTO, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Find")
|
||||
}
|
||||
|
||||
var r0 []*ItemDTO
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *ItemQuery) ([]*ItemDTO, error)); ok {
|
||||
return rf(ctx, query)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *ItemQuery) []*ItemDTO); ok {
|
||||
r0 = rf(ctx, query)
|
||||
} else {
|
||||
@@ -41,7 +52,6 @@ func (_m *FakeAnnotationsRepo) Find(ctx context.Context, query *ItemQuery) ([]*I
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *ItemQuery) error); ok {
|
||||
r1 = rf(ctx, query)
|
||||
} else {
|
||||
@@ -55,14 +65,21 @@ func (_m *FakeAnnotationsRepo) Find(ctx context.Context, query *ItemQuery) ([]*I
|
||||
func (_m *FakeAnnotationsRepo) FindTags(ctx context.Context, query *TagsQuery) (FindTagsResult, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FindTags")
|
||||
}
|
||||
|
||||
var r0 FindTagsResult
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *TagsQuery) (FindTagsResult, error)); ok {
|
||||
return rf(ctx, query)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *TagsQuery) FindTagsResult); ok {
|
||||
r0 = rf(ctx, query)
|
||||
} else {
|
||||
r0 = ret.Get(0).(FindTagsResult)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *TagsQuery) error); ok {
|
||||
r1 = rf(ctx, query)
|
||||
} else {
|
||||
@@ -76,6 +93,10 @@ func (_m *FakeAnnotationsRepo) FindTags(ctx context.Context, query *TagsQuery) (
|
||||
func (_m *FakeAnnotationsRepo) Save(ctx context.Context, item *Item) error {
|
||||
ret := _m.Called(ctx, item)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Save")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *Item) error); ok {
|
||||
r0 = rf(ctx, item)
|
||||
@@ -90,6 +111,10 @@ func (_m *FakeAnnotationsRepo) Save(ctx context.Context, item *Item) error {
|
||||
func (_m *FakeAnnotationsRepo) SaveMany(ctx context.Context, items []Item) error {
|
||||
ret := _m.Called(ctx, items)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SaveMany")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []Item) error); ok {
|
||||
r0 = rf(ctx, items)
|
||||
@@ -104,6 +129,10 @@ func (_m *FakeAnnotationsRepo) SaveMany(ctx context.Context, items []Item) error
|
||||
func (_m *FakeAnnotationsRepo) Update(ctx context.Context, item *Item) error {
|
||||
ret := _m.Called(ctx, item)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *Item) error); ok {
|
||||
r0 = rf(ctx, item)
|
||||
@@ -114,8 +143,12 @@ func (_m *FakeAnnotationsRepo) Update(ctx context.Context, item *Item) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewFakeAnnotationsRepo creates a new instance of FakeAnnotationsRepo. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewFakeAnnotationsRepo(t testing.TB) *FakeAnnotationsRepo {
|
||||
// NewFakeAnnotationsRepo creates a new instance of FakeAnnotationsRepo. 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 NewFakeAnnotationsRepo(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *FakeAnnotationsRepo {
|
||||
mock := &FakeAnnotationsRepo{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package authtest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package authtest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package idtest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.53.3. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package dashboards
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.53.3. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package dashboards
|
||||
|
||||
@@ -94,36 +94,6 @@ func (_m *FakeDashboardService) CountDashboardsInOrg(ctx context.Context, orgID
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDashboardsByLibraryPanelUID provides a mock function with given fields: ctx, libraryPanelUID, orgID
|
||||
func (_m *FakeDashboardService) GetDashboardsByLibraryPanelUID(ctx context.Context, libraryPanelUID string, orgID int64) ([]*DashboardRef, error) {
|
||||
ret := _m.Called(ctx, libraryPanelUID, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDashboardsByLibraryPanelUID")
|
||||
}
|
||||
|
||||
var r0 []*DashboardRef
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*DashboardRef, error)); ok {
|
||||
return rf(ctx, libraryPanelUID, orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*DashboardRef); ok {
|
||||
r0 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*DashboardRef)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
||||
r1 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CountInFolders provides a mock function with given fields: ctx, orgID, folderUIDs, user
|
||||
func (_m *FakeDashboardService) CountInFolders(ctx context.Context, orgID int64, folderUIDs []string, user identity.Requester) (int64, error) {
|
||||
ret := _m.Called(ctx, orgID, folderUIDs, user)
|
||||
@@ -368,6 +338,36 @@ func (_m *FakeDashboardService) GetDashboards(ctx context.Context, query *GetDas
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDashboardsByLibraryPanelUID provides a mock function with given fields: ctx, libraryPanelUID, orgID
|
||||
func (_m *FakeDashboardService) GetDashboardsByLibraryPanelUID(ctx context.Context, libraryPanelUID string, orgID int64) ([]*DashboardRef, error) {
|
||||
ret := _m.Called(ctx, libraryPanelUID, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDashboardsByLibraryPanelUID")
|
||||
}
|
||||
|
||||
var r0 []*DashboardRef
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*DashboardRef, error)); ok {
|
||||
return rf(ctx, libraryPanelUID, orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*DashboardRef); ok {
|
||||
r0 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*DashboardRef)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
||||
r1 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ImportDashboard provides a mock function with given fields: ctx, dto
|
||||
func (_m *FakeDashboardService) ImportDashboard(ctx context.Context, dto *SaveDashboardDTO) (*Dashboard, error) {
|
||||
ret := _m.Called(ctx, dto)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.53.3. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package dashboards
|
||||
|
||||
@@ -370,6 +370,36 @@ func (_m *FakeDashboardStore) GetDashboards(ctx context.Context, query *GetDashb
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDashboardsByLibraryPanelUID provides a mock function with given fields: ctx, libraryPanelUID, orgID
|
||||
func (_m *FakeDashboardStore) GetDashboardsByLibraryPanelUID(ctx context.Context, libraryPanelUID string, orgID int64) ([]*DashboardRef, error) {
|
||||
ret := _m.Called(ctx, libraryPanelUID, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDashboardsByLibraryPanelUID")
|
||||
}
|
||||
|
||||
var r0 []*DashboardRef
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*DashboardRef, error)); ok {
|
||||
return rf(ctx, libraryPanelUID, orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*DashboardRef); ok {
|
||||
r0 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*DashboardRef)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
||||
r1 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDashboardsByPluginID provides a mock function with given fields: ctx, query
|
||||
func (_m *FakeDashboardStore) GetDashboardsByPluginID(ctx context.Context, query *GetDashboardsByPluginIDQuery) ([]*Dashboard, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
@@ -628,36 +658,6 @@ func (_m *FakeDashboardStore) UnprovisionDashboard(ctx context.Context, id int64
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetDashboardsByLibraryPanelUID provides a mock function with given fields: ctx, libraryPanelUID, orgID
|
||||
func (_m *FakeDashboardStore) GetDashboardsByLibraryPanelUID(ctx context.Context, libraryPanelUID string, orgID int64) ([]*DashboardRef, error) {
|
||||
ret := _m.Called(ctx, libraryPanelUID, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDashboardsByLibraryPanelUID")
|
||||
}
|
||||
|
||||
var r0 []*DashboardRef
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*DashboardRef, error)); ok {
|
||||
return rf(ctx, libraryPanelUID, orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*DashboardRef); ok {
|
||||
r0 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*DashboardRef)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
||||
r1 = rf(ctx, libraryPanelUID, orgID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ValidateDashboardBeforeSave provides a mock function with given fields: ctx, dashboard, overwrite
|
||||
func (_m *FakeDashboardStore) ValidateDashboardBeforeSave(ctx context.Context, dashboard *Dashboard, overwrite bool) (bool, error) {
|
||||
ret := _m.Called(ctx, dashboard, overwrite)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.34.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package dashboardsnapshots
|
||||
|
||||
@@ -17,6 +17,10 @@ type MockService struct {
|
||||
func (_m *MockService) CreateDashboardSnapshot(_a0 context.Context, _a1 *CreateDashboardSnapshotCommand) (*DashboardSnapshot, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateDashboardSnapshot")
|
||||
}
|
||||
|
||||
var r0 *DashboardSnapshot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *CreateDashboardSnapshotCommand) (*DashboardSnapshot, error)); ok {
|
||||
@@ -43,6 +47,10 @@ func (_m *MockService) CreateDashboardSnapshot(_a0 context.Context, _a1 *CreateD
|
||||
func (_m *MockService) DeleteDashboardSnapshot(_a0 context.Context, _a1 *DeleteDashboardSnapshotCommand) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteDashboardSnapshot")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *DeleteDashboardSnapshotCommand) error); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
@@ -57,6 +65,10 @@ func (_m *MockService) DeleteDashboardSnapshot(_a0 context.Context, _a1 *DeleteD
|
||||
func (_m *MockService) DeleteExpiredSnapshots(_a0 context.Context, _a1 *DeleteExpiredSnapshotsCommand) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteExpiredSnapshots")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *DeleteExpiredSnapshotsCommand) error); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
@@ -71,6 +83,10 @@ func (_m *MockService) DeleteExpiredSnapshots(_a0 context.Context, _a1 *DeleteEx
|
||||
func (_m *MockService) GetDashboardSnapshot(_a0 context.Context, _a1 *GetDashboardSnapshotQuery) (*DashboardSnapshot, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDashboardSnapshot")
|
||||
}
|
||||
|
||||
var r0 *DashboardSnapshot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardSnapshotQuery) (*DashboardSnapshot, error)); ok {
|
||||
@@ -97,6 +113,10 @@ func (_m *MockService) GetDashboardSnapshot(_a0 context.Context, _a1 *GetDashboa
|
||||
func (_m *MockService) SearchDashboardSnapshots(_a0 context.Context, _a1 *GetDashboardSnapshotsQuery) (DashboardSnapshotsList, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SearchDashboardSnapshots")
|
||||
}
|
||||
|
||||
var r0 DashboardSnapshotsList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardSnapshotsQuery) (DashboardSnapshotsList, error)); ok {
|
||||
@@ -123,6 +143,10 @@ func (_m *MockService) SearchDashboardSnapshots(_a0 context.Context, _a1 *GetDas
|
||||
func (_m *MockService) ValidateDashboardExists(_a0 context.Context, _a1 int64, _a2 string) error {
|
||||
ret := _m.Called(_a0, _a1, _a2)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ValidateDashboardExists")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(_a0, _a1, _a2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package tests
|
||||
|
||||
@@ -18,6 +18,10 @@ type ExternalServiceRegistryMock struct {
|
||||
func (_m *ExternalServiceRegistryMock) GetExternalServiceNames(ctx context.Context) ([]string, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetExternalServiceNames")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
||||
@@ -44,6 +48,10 @@ func (_m *ExternalServiceRegistryMock) GetExternalServiceNames(ctx context.Conte
|
||||
func (_m *ExternalServiceRegistryMock) HasExternalService(ctx context.Context, name string) (bool, error) {
|
||||
ret := _m.Called(ctx, name)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for HasExternalService")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
|
||||
@@ -68,6 +76,10 @@ func (_m *ExternalServiceRegistryMock) HasExternalService(ctx context.Context, n
|
||||
func (_m *ExternalServiceRegistryMock) RemoveExternalService(ctx context.Context, name string) error {
|
||||
ret := _m.Called(ctx, name)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RemoveExternalService")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, name)
|
||||
@@ -82,6 +94,10 @@ func (_m *ExternalServiceRegistryMock) RemoveExternalService(ctx context.Context
|
||||
func (_m *ExternalServiceRegistryMock) SaveExternalService(ctx context.Context, cmd *extsvcauth.ExternalServiceRegistration) (*extsvcauth.ExternalService, error) {
|
||||
ret := _m.Called(ctx, cmd)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SaveExternalService")
|
||||
}
|
||||
|
||||
var r0 *extsvcauth.ExternalService
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *extsvcauth.ExternalServiceRegistration) (*extsvcauth.ExternalService, error)); ok {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.32.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package foldertest
|
||||
|
||||
@@ -14,10 +14,44 @@ type FakeFolderStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: ctx, q
|
||||
func (_m *FakeFolderStore) Get(ctx context.Context, q folder.GetFolderQuery) (*folder.Folder, error) {
|
||||
ret := _m.Called(ctx, q)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *folder.Folder
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, folder.GetFolderQuery) (*folder.Folder, error)); ok {
|
||||
return rf(ctx, q)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, folder.GetFolderQuery) *folder.Folder); ok {
|
||||
r0 = rf(ctx, q)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*folder.Folder)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, folder.GetFolderQuery) error); ok {
|
||||
r1 = rf(ctx, q)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetFolderByID provides a mock function with given fields: ctx, orgID, id
|
||||
func (_m *FakeFolderStore) GetFolderByID(ctx context.Context, orgID int64, id int64) (*folder.Folder, error) {
|
||||
ret := _m.Called(ctx, orgID, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetFolderByID")
|
||||
}
|
||||
|
||||
var r0 *folder.Folder
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*folder.Folder, error)); ok {
|
||||
@@ -40,36 +74,14 @@ func (_m *FakeFolderStore) GetFolderByID(ctx context.Context, orgID int64, id in
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: ctx, query
|
||||
func (_m *FakeFolderStore) Get(ctx context.Context, query folder.GetFolderQuery) (*folder.Folder, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
var r0 *folder.Folder
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, folder.GetFolderQuery) (*folder.Folder, error)); ok {
|
||||
return rf(ctx, query)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, folder.GetFolderQuery) *folder.Folder); ok {
|
||||
r0 = rf(ctx, query)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*folder.Folder)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, folder.GetFolderQuery) error); ok {
|
||||
r1 = rf(ctx, query)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetFolderByUID provides a mock function with given fields: ctx, orgID, uid
|
||||
func (_m *FakeFolderStore) GetFolderByUID(ctx context.Context, orgID int64, uid string) (*folder.Folder, error) {
|
||||
ret := _m.Called(ctx, orgID, uid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetFolderByUID")
|
||||
}
|
||||
|
||||
var r0 *folder.Folder
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*folder.Folder, error)); ok {
|
||||
@@ -96,6 +108,10 @@ func (_m *FakeFolderStore) GetFolderByUID(ctx context.Context, orgID int64, uid
|
||||
func (_m *FakeFolderStore) GetFolders(ctx context.Context, orgID int64, uids []string) (map[string]*folder.Folder, error) {
|
||||
ret := _m.Called(ctx, orgID, uids)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetFolders")
|
||||
}
|
||||
|
||||
var r0 map[string]*folder.Folder
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, []string) (map[string]*folder.Folder, error)); ok {
|
||||
@@ -118,29 +134,6 @@ func (_m *FakeFolderStore) GetFolders(ctx context.Context, orgID int64, uids []s
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
func (_m *FakeFolderStore) CountInOrg(ctx context.Context, orgID int64) (int64, error) {
|
||||
ret := _m.Called(ctx, orgID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok {
|
||||
return rf(ctx, orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok {
|
||||
r0 = rf(ctx, orgID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
||||
r1 = rf(ctx, orgID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// NewFakeFolderStore creates a new instance of FakeFolderStore. 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 NewFakeFolderStore(t interface {
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package eval_mocks
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
backend "github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
eval "github.com/grafana/grafana/pkg/services/ngalert/eval"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ConditionEvaluatorMock is an autogenerated mock type for the ConditionEvaluator type
|
||||
@@ -29,7 +31,15 @@ func (_m *ConditionEvaluatorMock) EXPECT() *ConditionEvaluatorMock_Expecter {
|
||||
func (_m *ConditionEvaluatorMock) Evaluate(ctx context.Context, now time.Time) (eval.Results, error) {
|
||||
ret := _m.Called(ctx, now)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Evaluate")
|
||||
}
|
||||
|
||||
var r0 eval.Results
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Time) (eval.Results, error)); ok {
|
||||
return rf(ctx, now)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Time) eval.Results); ok {
|
||||
r0 = rf(ctx, now)
|
||||
} else {
|
||||
@@ -38,7 +48,6 @@ func (_m *ConditionEvaluatorMock) Evaluate(ctx context.Context, now time.Time) (
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
|
||||
r1 = rf(ctx, now)
|
||||
} else {
|
||||
@@ -56,7 +65,7 @@ type ConditionEvaluatorMock_Evaluate_Call struct {
|
||||
// Evaluate is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - now time.Time
|
||||
func (_e *ConditionEvaluatorMock_Expecter) Evaluate(ctx any, now any) *ConditionEvaluatorMock_Evaluate_Call {
|
||||
func (_e *ConditionEvaluatorMock_Expecter) Evaluate(ctx interface{}, now interface{}) *ConditionEvaluatorMock_Evaluate_Call {
|
||||
return &ConditionEvaluatorMock_Evaluate_Call{Call: _e.mock.On("Evaluate", ctx, now)}
|
||||
}
|
||||
|
||||
@@ -72,11 +81,24 @@ func (_c *ConditionEvaluatorMock_Evaluate_Call) Return(_a0 eval.Results, _a1 err
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *ConditionEvaluatorMock_Evaluate_Call) RunAndReturn(run func(context.Context, time.Time) (eval.Results, error)) *ConditionEvaluatorMock_Evaluate_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// EvaluateRaw provides a mock function with given fields: ctx, now
|
||||
func (_m *ConditionEvaluatorMock) EvaluateRaw(ctx context.Context, now time.Time) (*backend.QueryDataResponse, error) {
|
||||
ret := _m.Called(ctx, now)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for EvaluateRaw")
|
||||
}
|
||||
|
||||
var r0 *backend.QueryDataResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*backend.QueryDataResponse, error)); ok {
|
||||
return rf(ctx, now)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Time) *backend.QueryDataResponse); ok {
|
||||
r0 = rf(ctx, now)
|
||||
} else {
|
||||
@@ -85,7 +107,6 @@ func (_m *ConditionEvaluatorMock) EvaluateRaw(ctx context.Context, now time.Time
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
|
||||
r1 = rf(ctx, now)
|
||||
} else {
|
||||
@@ -103,7 +124,7 @@ type ConditionEvaluatorMock_EvaluateRaw_Call struct {
|
||||
// EvaluateRaw is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - now time.Time
|
||||
func (_e *ConditionEvaluatorMock_Expecter) EvaluateRaw(ctx any, now any) *ConditionEvaluatorMock_EvaluateRaw_Call {
|
||||
func (_e *ConditionEvaluatorMock_Expecter) EvaluateRaw(ctx interface{}, now interface{}) *ConditionEvaluatorMock_EvaluateRaw_Call {
|
||||
return &ConditionEvaluatorMock_EvaluateRaw_Call{Call: _e.mock.On("EvaluateRaw", ctx, now)}
|
||||
}
|
||||
|
||||
@@ -119,13 +140,17 @@ func (_c *ConditionEvaluatorMock_EvaluateRaw_Call) Return(resp *backend.QueryDat
|
||||
return _c
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewConditionEvaluatorMock interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
func (_c *ConditionEvaluatorMock_EvaluateRaw_Call) RunAndReturn(run func(context.Context, time.Time) (*backend.QueryDataResponse, error)) *ConditionEvaluatorMock_EvaluateRaw_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// NewConditionEvaluatorMock creates a new instance of ConditionEvaluatorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewConditionEvaluatorMock(t mockConstructorTestingTNewConditionEvaluatorMock) *ConditionEvaluatorMock {
|
||||
// The first argument is typically a *testing.T value.
|
||||
func NewConditionEvaluatorMock(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *ConditionEvaluatorMock {
|
||||
mock := &ConditionEvaluatorMock{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.44.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package alertmanager_mock
|
||||
|
||||
@@ -585,7 +585,7 @@ func (_c *AlertmanagerMock_PutAlerts_Call) RunAndReturn(run func(context.Context
|
||||
return _c
|
||||
}
|
||||
|
||||
// Ready provides a mock function with given fields:
|
||||
// Ready provides a mock function with no fields
|
||||
func (_m *AlertmanagerMock) Ready() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -781,7 +781,7 @@ func (_c *AlertmanagerMock_SilenceState_Call) RunAndReturn(run func(context.Cont
|
||||
return _c
|
||||
}
|
||||
|
||||
// StopAndWait provides a mock function with given fields:
|
||||
// StopAndWait provides a mock function with no fields
|
||||
func (_m *AlertmanagerMock) StopAndWait() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -809,7 +809,7 @@ func (_c *AlertmanagerMock_StopAndWait_Call) Return() *AlertmanagerMock_StopAndW
|
||||
}
|
||||
|
||||
func (_c *AlertmanagerMock_StopAndWait_Call) RunAndReturn(run func()) *AlertmanagerMock_StopAndWait_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.44.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package legacy_storage
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.34.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package provisioning
|
||||
|
||||
@@ -26,6 +26,10 @@ func (_m *MockProvisioningStore) EXPECT() *MockProvisioningStore_Expecter {
|
||||
func (_m *MockProvisioningStore) DeleteProvenance(ctx context.Context, o models.Provisionable, org int64) error {
|
||||
ret := _m.Called(ctx, o, org)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteProvenance")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.Provisionable, int64) error); ok {
|
||||
r0 = rf(ctx, o, org)
|
||||
@@ -70,6 +74,10 @@ func (_c *MockProvisioningStore_DeleteProvenance_Call) RunAndReturn(run func(con
|
||||
func (_m *MockProvisioningStore) GetProvenance(ctx context.Context, o models.Provisionable, org int64) (models.Provenance, error) {
|
||||
ret := _m.Called(ctx, o, org)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetProvenance")
|
||||
}
|
||||
|
||||
var r0 models.Provenance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.Provisionable, int64) (models.Provenance, error)); ok {
|
||||
@@ -124,6 +132,10 @@ func (_c *MockProvisioningStore_GetProvenance_Call) RunAndReturn(run func(contex
|
||||
func (_m *MockProvisioningStore) GetProvenances(ctx context.Context, org int64, resourceType string) (map[string]models.Provenance, error) {
|
||||
ret := _m.Called(ctx, org, resourceType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetProvenances")
|
||||
}
|
||||
|
||||
var r0 map[string]models.Provenance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (map[string]models.Provenance, error)); ok {
|
||||
@@ -180,6 +192,10 @@ func (_c *MockProvisioningStore_GetProvenances_Call) RunAndReturn(run func(conte
|
||||
func (_m *MockProvisioningStore) SetProvenance(ctx context.Context, o models.Provisionable, org int64, p models.Provenance) error {
|
||||
ret := _m.Called(ctx, o, org, p)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetProvenance")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.Provisionable, int64, models.Provenance) error); ok {
|
||||
r0 = rf(ctx, o, org, p)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.34.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package provisioning
|
||||
|
||||
@@ -26,6 +26,10 @@ func (_m *MockQuotaChecker) EXPECT() *MockQuotaChecker_Expecter {
|
||||
func (_m *MockQuotaChecker) CheckQuotaReached(ctx context.Context, target quota.TargetSrv, scopeParams *quota.ScopeParameters) (bool, error) {
|
||||
ret := _m.Called(ctx, target, scopeParams)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CheckQuotaReached")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, quota.TargetSrv, *quota.ScopeParameters) (bool, error)); ok {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.44.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package alertmanager_mock
|
||||
|
||||
@@ -125,52 +125,6 @@ func (_c *RemoteAlertmanagerMock_CompareAndSendConfiguration_Call) RunAndReturn(
|
||||
return _c
|
||||
}
|
||||
|
||||
// SendState provides a mock function with given fields: _a0
|
||||
func (_m *RemoteAlertmanagerMock) SendState(_a0 context.Context) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SendState")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(_a0)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoteAlertmanagerMock_SendState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendState'
|
||||
type RemoteAlertmanagerMock_SendState_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// SendState is a helper method to define mock.On call
|
||||
// - _a0 context.Context
|
||||
func (_e *RemoteAlertmanagerMock_Expecter) SendState(_a0 interface{}) *RemoteAlertmanagerMock_SendState_Call {
|
||||
return &RemoteAlertmanagerMock_SendState_Call{Call: _e.mock.On("SendState", _a0)}
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_SendState_Call) Run(run func(_a0 context.Context)) *RemoteAlertmanagerMock_SendState_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_SendState_Call) Return(_a0 error) *RemoteAlertmanagerMock_SendState_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_SendState_Call) RunAndReturn(run func(context.Context) error) *RemoteAlertmanagerMock_SendState_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// CreateSilence provides a mock function with given fields: _a0, _a1
|
||||
func (_m *RemoteAlertmanagerMock) CreateSilence(_a0 context.Context, _a1 *v2models.PostableSilence) (string, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
@@ -678,7 +632,7 @@ func (_c *RemoteAlertmanagerMock_PutAlerts_Call) RunAndReturn(run func(context.C
|
||||
return _c
|
||||
}
|
||||
|
||||
// Ready provides a mock function with given fields:
|
||||
// Ready provides a mock function with no fields
|
||||
func (_m *RemoteAlertmanagerMock) Ready() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -816,6 +770,52 @@ func (_c *RemoteAlertmanagerMock_SaveAndApplyDefaultConfig_Call) RunAndReturn(ru
|
||||
return _c
|
||||
}
|
||||
|
||||
// SendState provides a mock function with given fields: _a0
|
||||
func (_m *RemoteAlertmanagerMock) SendState(_a0 context.Context) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SendState")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(_a0)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoteAlertmanagerMock_SendState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendState'
|
||||
type RemoteAlertmanagerMock_SendState_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// SendState is a helper method to define mock.On call
|
||||
// - _a0 context.Context
|
||||
func (_e *RemoteAlertmanagerMock_Expecter) SendState(_a0 interface{}) *RemoteAlertmanagerMock_SendState_Call {
|
||||
return &RemoteAlertmanagerMock_SendState_Call{Call: _e.mock.On("SendState", _a0)}
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_SendState_Call) Run(run func(_a0 context.Context)) *RemoteAlertmanagerMock_SendState_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_SendState_Call) Return(_a0 error) *RemoteAlertmanagerMock_SendState_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_SendState_Call) RunAndReturn(run func(context.Context) error) *RemoteAlertmanagerMock_SendState_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SilenceState provides a mock function with given fields: _a0
|
||||
func (_m *RemoteAlertmanagerMock) SilenceState(_a0 context.Context) (notify.SilenceState, error) {
|
||||
ret := _m.Called(_a0)
|
||||
@@ -874,7 +874,7 @@ func (_c *RemoteAlertmanagerMock_SilenceState_Call) RunAndReturn(run func(contex
|
||||
return _c
|
||||
}
|
||||
|
||||
// StopAndWait provides a mock function with given fields:
|
||||
// StopAndWait provides a mock function with no fields
|
||||
func (_m *RemoteAlertmanagerMock) StopAndWait() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -902,7 +902,7 @@ func (_c *RemoteAlertmanagerMock_StopAndWait_Call) Return() *RemoteAlertmanagerM
|
||||
}
|
||||
|
||||
func (_c *RemoteAlertmanagerMock_StopAndWait_Call) RunAndReturn(run func()) *RemoteAlertmanagerMock_StopAndWait_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.34.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package schedule
|
||||
|
||||
@@ -55,7 +55,7 @@ func (_c *AlertsSenderMock_Send_Call) Return() *AlertsSenderMock_Send_Call {
|
||||
}
|
||||
|
||||
func (_c *AlertsSenderMock_Send_Call) RunAndReturn(run func(context.Context, models.AlertRuleKey, definitions.PostableAlerts)) *AlertsSenderMock_Send_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// Code generated by mockery v2.10.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
models "github.com/grafana/grafana/pkg/services/ngalert/models"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// AdminConfigurationStoreMock is an autogenerated mock type for the AdminConfigurationStore type
|
||||
@@ -25,6 +24,10 @@ func (_m *AdminConfigurationStoreMock) EXPECT() *AdminConfigurationStoreMock_Exp
|
||||
func (_m *AdminConfigurationStoreMock) DeleteAdminConfiguration(orgID int64) error {
|
||||
ret := _m.Called(orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteAdminConfiguration")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(int64) error); ok {
|
||||
r0 = rf(orgID)
|
||||
@@ -42,7 +45,7 @@ type AdminConfigurationStoreMock_DeleteAdminConfiguration_Call struct {
|
||||
|
||||
// DeleteAdminConfiguration is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
func (_e *AdminConfigurationStoreMock_Expecter) DeleteAdminConfiguration(orgID any) *AdminConfigurationStoreMock_DeleteAdminConfiguration_Call {
|
||||
func (_e *AdminConfigurationStoreMock_Expecter) DeleteAdminConfiguration(orgID interface{}) *AdminConfigurationStoreMock_DeleteAdminConfiguration_Call {
|
||||
return &AdminConfigurationStoreMock_DeleteAdminConfiguration_Call{Call: _e.mock.On("DeleteAdminConfiguration", orgID)}
|
||||
}
|
||||
|
||||
@@ -58,11 +61,24 @@ func (_c *AdminConfigurationStoreMock_DeleteAdminConfiguration_Call) Return(_a0
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *AdminConfigurationStoreMock_DeleteAdminConfiguration_Call) RunAndReturn(run func(int64) error) *AdminConfigurationStoreMock_DeleteAdminConfiguration_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetAdminConfiguration provides a mock function with given fields: orgID
|
||||
func (_m *AdminConfigurationStoreMock) GetAdminConfiguration(orgID int64) (*models.AdminConfiguration, error) {
|
||||
ret := _m.Called(orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetAdminConfiguration")
|
||||
}
|
||||
|
||||
var r0 *models.AdminConfiguration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64) (*models.AdminConfiguration, error)); ok {
|
||||
return rf(orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64) *models.AdminConfiguration); ok {
|
||||
r0 = rf(orgID)
|
||||
} else {
|
||||
@@ -71,7 +87,6 @@ func (_m *AdminConfigurationStoreMock) GetAdminConfiguration(orgID int64) (*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
||||
r1 = rf(orgID)
|
||||
} else {
|
||||
@@ -88,7 +103,7 @@ type AdminConfigurationStoreMock_GetAdminConfiguration_Call struct {
|
||||
|
||||
// GetAdminConfiguration is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
func (_e *AdminConfigurationStoreMock_Expecter) GetAdminConfiguration(orgID any) *AdminConfigurationStoreMock_GetAdminConfiguration_Call {
|
||||
func (_e *AdminConfigurationStoreMock_Expecter) GetAdminConfiguration(orgID interface{}) *AdminConfigurationStoreMock_GetAdminConfiguration_Call {
|
||||
return &AdminConfigurationStoreMock_GetAdminConfiguration_Call{Call: _e.mock.On("GetAdminConfiguration", orgID)}
|
||||
}
|
||||
|
||||
@@ -104,11 +119,24 @@ func (_c *AdminConfigurationStoreMock_GetAdminConfiguration_Call) Return(_a0 *mo
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetAdminConfigurations provides a mock function with given fields:
|
||||
func (_c *AdminConfigurationStoreMock_GetAdminConfiguration_Call) RunAndReturn(run func(int64) (*models.AdminConfiguration, error)) *AdminConfigurationStoreMock_GetAdminConfiguration_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetAdminConfigurations provides a mock function with no fields
|
||||
func (_m *AdminConfigurationStoreMock) GetAdminConfigurations() ([]*models.AdminConfiguration, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetAdminConfigurations")
|
||||
}
|
||||
|
||||
var r0 []*models.AdminConfiguration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*models.AdminConfiguration, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*models.AdminConfiguration); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -117,7 +145,6 @@ func (_m *AdminConfigurationStoreMock) GetAdminConfigurations() ([]*models.Admin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -149,10 +176,19 @@ func (_c *AdminConfigurationStoreMock_GetAdminConfigurations_Call) Return(_a0 []
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *AdminConfigurationStoreMock_GetAdminConfigurations_Call) RunAndReturn(run func() ([]*models.AdminConfiguration, error)) *AdminConfigurationStoreMock_GetAdminConfigurations_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// UpdateAdminConfiguration provides a mock function with given fields: _a0
|
||||
func (_m *AdminConfigurationStoreMock) UpdateAdminConfiguration(_a0 UpdateAdminConfigurationCmd) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateAdminConfiguration")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(UpdateAdminConfigurationCmd) error); ok {
|
||||
r0 = rf(_a0)
|
||||
@@ -170,7 +206,7 @@ type AdminConfigurationStoreMock_UpdateAdminConfiguration_Call struct {
|
||||
|
||||
// UpdateAdminConfiguration is a helper method to define mock.On call
|
||||
// - _a0 UpdateAdminConfigurationCmd
|
||||
func (_e *AdminConfigurationStoreMock_Expecter) UpdateAdminConfiguration(_a0 any) *AdminConfigurationStoreMock_UpdateAdminConfiguration_Call {
|
||||
func (_e *AdminConfigurationStoreMock_Expecter) UpdateAdminConfiguration(_a0 interface{}) *AdminConfigurationStoreMock_UpdateAdminConfiguration_Call {
|
||||
return &AdminConfigurationStoreMock_UpdateAdminConfiguration_Call{Call: _e.mock.On("UpdateAdminConfiguration", _a0)}
|
||||
}
|
||||
|
||||
@@ -185,3 +221,22 @@ func (_c *AdminConfigurationStoreMock_UpdateAdminConfiguration_Call) Return(_a0
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *AdminConfigurationStoreMock_UpdateAdminConfiguration_Call) RunAndReturn(run func(UpdateAdminConfigurationCmd) error) *AdminConfigurationStoreMock_UpdateAdminConfiguration_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// NewAdminConfigurationStoreMock creates a new instance of AdminConfigurationStoreMock. 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 NewAdminConfigurationStoreMock(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *AdminConfigurationStoreMock {
|
||||
mock := &AdminConfigurationStoreMock{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package oauthtokentest
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package orgtest
|
||||
|
||||
@@ -62,24 +62,6 @@ func (_m *MockService) CreateWithMember(_a0 context.Context, _a1 *org.CreateOrgC
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockService) Delete(_a0 context.Context, _a1 *org.DeleteOrgCommand) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *org.DeleteOrgCommand) error); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteUserFromAll provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockService) DeleteUserFromAll(_a0 context.Context, _a1 int64) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.36.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package publicdashboards
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package publicdashboards
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package publicdashboards
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package publicdashboards
|
||||
|
||||
@@ -264,36 +264,6 @@ func (_m *FakePublicDashboardStore) FindByDashboardUid(ctx context.Context, orgI
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// FindByFolder provides a mock function with given fields: ctx, orgId, folderUid
|
||||
func (_m *FakePublicDashboardStore) FindByFolder(ctx context.Context, orgId int64, folderUid string) ([]*models.PublicDashboard, error) {
|
||||
ret := _m.Called(ctx, orgId, folderUid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FindByFolder")
|
||||
}
|
||||
|
||||
var r0 []*models.PublicDashboard
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*models.PublicDashboard, error)); ok {
|
||||
return rf(ctx, orgId, folderUid)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*models.PublicDashboard); ok {
|
||||
r0 = rf(ctx, orgId, folderUid)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*models.PublicDashboard)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
|
||||
r1 = rf(ctx, orgId, folderUid)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMetrics provides a mock function with given fields: ctx
|
||||
func (_m *FakePublicDashboardStore) GetMetrics(ctx context.Context) (*models.Metrics, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.6. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package searchV2
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
context "context"
|
||||
|
||||
backend "github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
user "github.com/grafana/grafana/pkg/services/user"
|
||||
@@ -20,6 +21,10 @@ type MockSearchService struct {
|
||||
func (_m *MockSearchService) DoDashboardQuery(ctx context.Context, _a1 *backend.User, orgId int64, query DashboardQuery) *backend.DataResponse {
|
||||
ret := _m.Called(ctx, _a1, orgId, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DoDashboardQuery")
|
||||
}
|
||||
|
||||
var r0 *backend.DataResponse
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *backend.User, int64, DashboardQuery) *backend.DataResponse); ok {
|
||||
r0 = rf(ctx, _a1, orgId, query)
|
||||
@@ -32,10 +37,14 @@ func (_m *MockSearchService) DoDashboardQuery(ctx context.Context, _a1 *backend.
|
||||
return r0
|
||||
}
|
||||
|
||||
// IsDisabled provides a mock function with given fields:
|
||||
// IsDisabled provides a mock function with no fields
|
||||
func (_m *MockSearchService) IsDisabled() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsDisabled")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@@ -50,6 +59,10 @@ func (_m *MockSearchService) IsDisabled() bool {
|
||||
func (_m *MockSearchService) IsReady(ctx context.Context, orgId int64) IsSearchReadyResponse {
|
||||
ret := _m.Called(ctx, orgId)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsReady")
|
||||
}
|
||||
|
||||
var r0 IsSearchReadyResponse
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) IsSearchReadyResponse); ok {
|
||||
r0 = rf(ctx, orgId)
|
||||
@@ -69,6 +82,10 @@ func (_m *MockSearchService) RegisterDashboardIndexExtender(ext DashboardIndexEx
|
||||
func (_m *MockSearchService) 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)
|
||||
@@ -79,7 +96,7 @@ func (_m *MockSearchService) Run(ctx context.Context) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// TriggerReIndex provides a mock function with given fields:
|
||||
// TriggerReIndex provides a mock function with no fields
|
||||
func (_m *MockSearchService) TriggerReIndex() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -88,6 +105,10 @@ func (_m *MockSearchService) TriggerReIndex() {
|
||||
func (_m *MockSearchService) doDashboardQuery(ctx context.Context, _a1 *user.SignedInUser, orgId int64, query DashboardQuery) *backend.DataResponse {
|
||||
ret := _m.Called(ctx, _a1, orgId, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for doDashboardQuery")
|
||||
}
|
||||
|
||||
var r0 *backend.DataResponse
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *user.SignedInUser, int64, DashboardQuery) *backend.DataResponse); ok {
|
||||
r0 = rf(ctx, _a1, orgId, query)
|
||||
@@ -99,3 +120,17 @@ func (_m *MockSearchService) doDashboardQuery(ctx context.Context, _a1 *user.Sig
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewMockSearchService creates a new instance of MockSearchService. 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 NewMockSearchService(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *MockSearchService {
|
||||
mock := &MockSearchService{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.37.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package fakes
|
||||
|
||||
@@ -18,6 +18,10 @@ type MockService struct {
|
||||
func (_m *MockService) Decrypt(ctx context.Context, payload []byte) ([]byte, error) {
|
||||
ret := _m.Called(ctx, payload)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Decrypt")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []byte) ([]byte, error)); ok {
|
||||
@@ -44,6 +48,10 @@ func (_m *MockService) Decrypt(ctx context.Context, payload []byte) ([]byte, err
|
||||
func (_m *MockService) DecryptJsonData(ctx context.Context, sjd map[string][]byte) (map[string]string, error) {
|
||||
ret := _m.Called(ctx, sjd)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DecryptJsonData")
|
||||
}
|
||||
|
||||
var r0 map[string]string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, map[string][]byte) (map[string]string, error)); ok {
|
||||
@@ -70,6 +78,10 @@ func (_m *MockService) DecryptJsonData(ctx context.Context, sjd map[string][]byt
|
||||
func (_m *MockService) Encrypt(ctx context.Context, payload []byte, opt secrets.EncryptionOptions) ([]byte, error) {
|
||||
ret := _m.Called(ctx, payload, opt)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Encrypt")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []byte, secrets.EncryptionOptions) ([]byte, error)); ok {
|
||||
@@ -96,6 +108,10 @@ func (_m *MockService) Encrypt(ctx context.Context, payload []byte, opt secrets.
|
||||
func (_m *MockService) EncryptJsonData(ctx context.Context, kv map[string]string, opt secrets.EncryptionOptions) (map[string][]byte, error) {
|
||||
ret := _m.Called(ctx, kv, opt)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for EncryptJsonData")
|
||||
}
|
||||
|
||||
var r0 map[string][]byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, map[string]string, secrets.EncryptionOptions) (map[string][]byte, error)); ok {
|
||||
@@ -122,6 +138,10 @@ func (_m *MockService) EncryptJsonData(ctx context.Context, kv map[string]string
|
||||
func (_m *MockService) GetDecryptedValue(ctx context.Context, sjd map[string][]byte, key string, fallback string) string {
|
||||
ret := _m.Called(ctx, sjd, key, fallback)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDecryptedValue")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(context.Context, map[string][]byte, string, string) string); ok {
|
||||
r0 = rf(ctx, sjd, key, fallback)
|
||||
@@ -136,6 +156,10 @@ func (_m *MockService) GetDecryptedValue(ctx context.Context, sjd map[string][]b
|
||||
func (_m *MockService) ReEncryptDataKeys(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ReEncryptDataKeys")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@@ -150,6 +174,10 @@ func (_m *MockService) ReEncryptDataKeys(ctx context.Context) error {
|
||||
func (_m *MockService) RotateDataKeys(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RotateDataKeys")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package tests
|
||||
|
||||
@@ -18,6 +18,10 @@ type MockExtSvcAccountsService struct {
|
||||
func (_m *MockExtSvcAccountsService) EnableExtSvcAccount(ctx context.Context, cmd *serviceaccounts.EnableExtSvcAccountCmd) error {
|
||||
ret := _m.Called(ctx, cmd)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for EnableExtSvcAccount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *serviceaccounts.EnableExtSvcAccountCmd) error); ok {
|
||||
r0 = rf(ctx, cmd)
|
||||
@@ -32,6 +36,10 @@ func (_m *MockExtSvcAccountsService) EnableExtSvcAccount(ctx context.Context, cm
|
||||
func (_m *MockExtSvcAccountsService) ManageExtSvcAccount(ctx context.Context, cmd *serviceaccounts.ManageExtSvcAccountCmd) (int64, error) {
|
||||
ret := _m.Called(ctx, cmd)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ManageExtSvcAccount")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *serviceaccounts.ManageExtSvcAccountCmd) (int64, error)); ok {
|
||||
@@ -56,6 +64,10 @@ func (_m *MockExtSvcAccountsService) ManageExtSvcAccount(ctx context.Context, cm
|
||||
func (_m *MockExtSvcAccountsService) RemoveExtSvcAccount(ctx context.Context, orgID int64, extSvcSlug string) error {
|
||||
ret := _m.Called(ctx, orgID, extSvcSlug)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RemoveExtSvcAccount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(ctx, orgID, extSvcSlug)
|
||||
@@ -70,6 +82,10 @@ func (_m *MockExtSvcAccountsService) RemoveExtSvcAccount(ctx context.Context, or
|
||||
func (_m *MockExtSvcAccountsService) RetrieveExtSvcAccount(ctx context.Context, orgID int64, saID int64) (*serviceaccounts.ExtSvcAccount, error) {
|
||||
ret := _m.Called(ctx, orgID, saID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RetrieveExtSvcAccount")
|
||||
}
|
||||
|
||||
var r0 *serviceaccounts.ExtSvcAccount
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*serviceaccounts.ExtSvcAccount, error)); ok {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package tests
|
||||
|
||||
@@ -21,6 +21,10 @@ type MockServiceAccountService struct {
|
||||
func (_m *MockServiceAccountService) AddServiceAccountToken(ctx context.Context, serviceAccountID int64, cmd *serviceaccounts.AddServiceAccountTokenCommand) (*apikey.APIKey, error) {
|
||||
ret := _m.Called(ctx, serviceAccountID, cmd)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddServiceAccountToken")
|
||||
}
|
||||
|
||||
var r0 *apikey.APIKey
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *serviceaccounts.AddServiceAccountTokenCommand) (*apikey.APIKey, error)); ok {
|
||||
@@ -47,6 +51,10 @@ func (_m *MockServiceAccountService) AddServiceAccountToken(ctx context.Context,
|
||||
func (_m *MockServiceAccountService) CreateServiceAccount(ctx context.Context, orgID int64, saForm *serviceaccounts.CreateServiceAccountForm) (*serviceaccounts.ServiceAccountDTO, error) {
|
||||
ret := _m.Called(ctx, orgID, saForm)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateServiceAccount")
|
||||
}
|
||||
|
||||
var r0 *serviceaccounts.ServiceAccountDTO
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *serviceaccounts.CreateServiceAccountForm) (*serviceaccounts.ServiceAccountDTO, error)); ok {
|
||||
@@ -73,6 +81,10 @@ func (_m *MockServiceAccountService) CreateServiceAccount(ctx context.Context, o
|
||||
func (_m *MockServiceAccountService) DeleteServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64) error {
|
||||
ret := _m.Called(ctx, orgID, serviceAccountID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteServiceAccount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, orgID, serviceAccountID)
|
||||
@@ -87,6 +99,10 @@ func (_m *MockServiceAccountService) DeleteServiceAccount(ctx context.Context, o
|
||||
func (_m *MockServiceAccountService) DeleteServiceAccountToken(ctx context.Context, orgID int64, serviceAccountID int64, tokenID int64) error {
|
||||
ret := _m.Called(ctx, orgID, serviceAccountID, tokenID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteServiceAccountToken")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, int64) error); ok {
|
||||
r0 = rf(ctx, orgID, serviceAccountID, tokenID)
|
||||
@@ -101,6 +117,10 @@ func (_m *MockServiceAccountService) DeleteServiceAccountToken(ctx context.Conte
|
||||
func (_m *MockServiceAccountService) EnableServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, enable bool) error {
|
||||
ret := _m.Called(ctx, orgID, serviceAccountID, enable)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for EnableServiceAccount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, bool) error); ok {
|
||||
r0 = rf(ctx, orgID, serviceAccountID, enable)
|
||||
@@ -115,6 +135,10 @@ func (_m *MockServiceAccountService) EnableServiceAccount(ctx context.Context, o
|
||||
func (_m *MockServiceAccountService) ListTokens(ctx context.Context, query *serviceaccounts.GetSATokensQuery) ([]apikey.APIKey, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListTokens")
|
||||
}
|
||||
|
||||
var r0 []apikey.APIKey
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *serviceaccounts.GetSATokensQuery) ([]apikey.APIKey, error)); ok {
|
||||
@@ -141,6 +165,10 @@ func (_m *MockServiceAccountService) ListTokens(ctx context.Context, query *serv
|
||||
func (_m *MockServiceAccountService) MigrateApiKeysToServiceAccounts(ctx context.Context, orgID int64) (*serviceaccounts.MigrationResult, error) {
|
||||
ret := _m.Called(ctx, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for MigrateApiKeysToServiceAccounts")
|
||||
}
|
||||
|
||||
var r0 *serviceaccounts.MigrationResult
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*serviceaccounts.MigrationResult, error)); ok {
|
||||
@@ -163,10 +191,14 @@ func (_m *MockServiceAccountService) MigrateApiKeysToServiceAccounts(ctx context
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// RetrieveServiceAccount provides a mock function with given fields: ctx, orgID, serviceAccountID
|
||||
// RetrieveServiceAccount provides a mock function with given fields: ctx, query
|
||||
func (_m *MockServiceAccountService) RetrieveServiceAccount(ctx context.Context, query *serviceaccounts.GetServiceAccountQuery) (*serviceaccounts.ServiceAccountProfileDTO, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RetrieveServiceAccount")
|
||||
}
|
||||
|
||||
var r0 *serviceaccounts.ServiceAccountProfileDTO
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *serviceaccounts.GetServiceAccountQuery) (*serviceaccounts.ServiceAccountProfileDTO, error)); ok {
|
||||
@@ -193,6 +225,10 @@ func (_m *MockServiceAccountService) RetrieveServiceAccount(ctx context.Context,
|
||||
func (_m *MockServiceAccountService) RetrieveServiceAccountIdByName(ctx context.Context, orgID int64, name string) (int64, error) {
|
||||
ret := _m.Called(ctx, orgID, name)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RetrieveServiceAccountIdByName")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (int64, error)); ok {
|
||||
@@ -217,6 +253,10 @@ func (_m *MockServiceAccountService) RetrieveServiceAccountIdByName(ctx context.
|
||||
func (_m *MockServiceAccountService) SearchOrgServiceAccounts(ctx context.Context, query *serviceaccounts.SearchOrgServiceAccountsQuery) (*serviceaccounts.SearchOrgServiceAccountsResult, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SearchOrgServiceAccounts")
|
||||
}
|
||||
|
||||
var r0 *serviceaccounts.SearchOrgServiceAccountsResult
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *serviceaccounts.SearchOrgServiceAccountsQuery) (*serviceaccounts.SearchOrgServiceAccountsResult, error)); ok {
|
||||
@@ -243,6 +283,10 @@ func (_m *MockServiceAccountService) SearchOrgServiceAccounts(ctx context.Contex
|
||||
func (_m *MockServiceAccountService) UpdateServiceAccount(ctx context.Context, orgID int64, serviceAccountID int64, saForm *serviceaccounts.UpdateServiceAccountForm) (*serviceaccounts.ServiceAccountProfileDTO, error) {
|
||||
ret := _m.Called(ctx, orgID, serviceAccountID, saForm)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateServiceAccount")
|
||||
}
|
||||
|
||||
var r0 *serviceaccounts.ServiceAccountProfileDTO
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, *serviceaccounts.UpdateServiceAccountForm) (*serviceaccounts.ServiceAccountProfileDTO, error)); ok {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package ssosettingstests
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.40.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package ssosettingstests
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.40.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package ssosettingstests
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.12.3. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package store
|
||||
|
||||
@@ -18,7 +18,15 @@ type MockEntityEventsService struct {
|
||||
func (_m *MockEntityEventsService) GetAllEventsAfter(ctx context.Context, id int64) ([]*EntityEvent, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetAllEventsAfter")
|
||||
}
|
||||
|
||||
var r0 []*EntityEvent
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*EntityEvent, error)); ok {
|
||||
return rf(ctx, id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) []*EntityEvent); ok {
|
||||
r0 = rf(ctx, id)
|
||||
} else {
|
||||
@@ -27,7 +35,6 @@ func (_m *MockEntityEventsService) GetAllEventsAfter(ctx context.Context, id int
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
||||
r1 = rf(ctx, id)
|
||||
} else {
|
||||
@@ -41,7 +48,15 @@ func (_m *MockEntityEventsService) GetAllEventsAfter(ctx context.Context, id int
|
||||
func (_m *MockEntityEventsService) GetLastEvent(ctx context.Context) (*EntityEvent, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLastEvent")
|
||||
}
|
||||
|
||||
var r0 *EntityEvent
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (*EntityEvent, error)); ok {
|
||||
return rf(ctx)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context) *EntityEvent); ok {
|
||||
r0 = rf(ctx)
|
||||
} else {
|
||||
@@ -50,7 +65,6 @@ func (_m *MockEntityEventsService) GetLastEvent(ctx context.Context) (*EntityEve
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||
r1 = rf(ctx)
|
||||
} else {
|
||||
@@ -60,10 +74,14 @@ func (_m *MockEntityEventsService) GetLastEvent(ctx context.Context) (*EntityEve
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// IsDisabled provides a mock function with given fields:
|
||||
// IsDisabled provides a mock function with no fields
|
||||
func (_m *MockEntityEventsService) IsDisabled() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsDisabled")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@@ -74,15 +92,14 @@ func (_m *MockEntityEventsService) IsDisabled() bool {
|
||||
return r0
|
||||
}
|
||||
|
||||
// OnEvent provides a mock function with given fields: handler
|
||||
func (_m *MockEntityEventsService) OnEvent(handler EventHandler) {
|
||||
_m.Called(handler)
|
||||
}
|
||||
|
||||
// Run provides a mock function with given fields: ctx
|
||||
func (_m *MockEntityEventsService) 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)
|
||||
@@ -93,24 +110,14 @@ func (_m *MockEntityEventsService) Run(ctx context.Context) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// SaveEvent provides a mock function with given fields: ctx, cmd
|
||||
func (_m *MockEntityEventsService) SaveEvent(ctx context.Context, cmd SaveEventCmd) error {
|
||||
ret := _m.Called(ctx, cmd)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, SaveEventCmd) error); ok {
|
||||
r0 = rf(ctx, cmd)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// deleteEventsOlderThan provides a mock function with given fields: ctx, duration
|
||||
func (_m *MockEntityEventsService) deleteEventsOlderThan(ctx context.Context, duration time.Duration) error {
|
||||
ret := _m.Called(ctx, duration)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for deleteEventsOlderThan")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Duration) error); ok {
|
||||
r0 = rf(ctx, duration)
|
||||
@@ -121,13 +128,12 @@ func (_m *MockEntityEventsService) deleteEventsOlderThan(ctx context.Context, du
|
||||
return r0
|
||||
}
|
||||
|
||||
type NewMockEntityEventsServiceT interface {
|
||||
// NewMockEntityEventsService creates a new instance of MockEntityEventsService. 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 NewMockEntityEventsService(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMockEntityEventsService creates a new instance of MockEntityEventsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMockEntityEventsService(t NewMockEntityEventsServiceT) *MockEntityEventsService {
|
||||
}) *MockEntityEventsService {
|
||||
mock := &MockEntityEventsService{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
filestorage "github.com/grafana/grafana/pkg/infra/filestorage"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
filestorage "github.com/grafana/grafana/pkg/infra/filestorage"
|
||||
user "github.com/grafana/grafana/pkg/services/user"
|
||||
)
|
||||
|
||||
@@ -18,7 +18,15 @@ type FakeSystemUsers struct {
|
||||
func (_m *FakeSystemUsers) GetFilter(_a0 *user.SignedInUser) (map[string]filestorage.PathFilter, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetFilter")
|
||||
}
|
||||
|
||||
var r0 map[string]filestorage.PathFilter
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*user.SignedInUser) (map[string]filestorage.PathFilter, error)); ok {
|
||||
return rf(_a0)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*user.SignedInUser) map[string]filestorage.PathFilter); ok {
|
||||
r0 = rf(_a0)
|
||||
} else {
|
||||
@@ -27,7 +35,6 @@ func (_m *FakeSystemUsers) GetFilter(_a0 *user.SignedInUser) (map[string]filesto
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*user.SignedInUser) error); ok {
|
||||
r1 = rf(_a0)
|
||||
} else {
|
||||
@@ -41,7 +48,15 @@ func (_m *FakeSystemUsers) GetFilter(_a0 *user.SignedInUser) (map[string]filesto
|
||||
func (_m *FakeSystemUsers) GetUser(userType SystemUserType, orgID int64) (*user.SignedInUser, error) {
|
||||
ret := _m.Called(userType, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetUser")
|
||||
}
|
||||
|
||||
var r0 *user.SignedInUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(SystemUserType, int64) (*user.SignedInUser, error)); ok {
|
||||
return rf(userType, orgID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(SystemUserType, int64) *user.SignedInUser); ok {
|
||||
r0 = rf(userType, orgID)
|
||||
} else {
|
||||
@@ -50,7 +65,6 @@ func (_m *FakeSystemUsers) GetUser(userType SystemUserType, orgID int64) (*user.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(SystemUserType, int64) error); ok {
|
||||
r1 = rf(userType, orgID)
|
||||
} else {
|
||||
@@ -65,13 +79,12 @@ func (_m *FakeSystemUsers) RegisterUser(userType SystemUserType, filterFn func()
|
||||
_m.Called(userType, filterFn)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewFakeSystemUsers interface {
|
||||
// NewFakeSystemUsers creates a new instance of FakeSystemUsers. 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 NewFakeSystemUsers(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewFakeSystemUsers creates a new instance of FakeSystemUsers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewFakeSystemUsers(t mockConstructorTestingTNewFakeSystemUsers) *FakeSystemUsers {
|
||||
}) *FakeSystemUsers {
|
||||
mock := &FakeSystemUsers{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package usertest
|
||||
|
||||
@@ -230,35 +230,6 @@ func (_m *MockService) GetByUID(_a0 context.Context, _a1 *user.GetUserByUIDQuery
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
func (_m *MockService) ListByIdOrUID(_a0 context.Context, _a1 []string, _a2 []int64) ([]*user.User, error) {
|
||||
ret := _m.Called(_a0, _a1, _a2)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListByIdOrUID")
|
||||
}
|
||||
|
||||
var r0 []*user.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, []int64) ([]*user.User, error)); ok {
|
||||
return rf(_a0, _a1, _a2)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, []int64) []*user.User); ok {
|
||||
r0 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*user.User)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, []string, []int64) error); ok {
|
||||
r1 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetProfile provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockService) GetProfile(_a0 context.Context, _a1 *user.GetUserProfileQuery) (*user.UserProfileDTO, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
@@ -339,6 +310,36 @@ func (_m *MockService) GetUsageStats(ctx context.Context) map[string]interface{}
|
||||
return r0
|
||||
}
|
||||
|
||||
// ListByIdOrUID provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *MockService) ListByIdOrUID(_a0 context.Context, _a1 []string, _a2 []int64) ([]*user.User, error) {
|
||||
ret := _m.Called(_a0, _a1, _a2)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListByIdOrUID")
|
||||
}
|
||||
|
||||
var r0 []*user.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, []int64) ([]*user.User, error)); ok {
|
||||
return rf(_a0, _a1, _a2)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, []int64) []*user.User); ok {
|
||||
r0 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*user.User)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, []string, []int64) error); ok {
|
||||
r1 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Search provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockService) Search(_a0 context.Context, _a1 *user.SearchUsersQuery) (*user.SearchUserQueryResult, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.46.3. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package settingtest
|
||||
|
||||
@@ -12,7 +12,7 @@ type MockProvider struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Current provides a mock function with given fields:
|
||||
// Current provides a mock function with no fields
|
||||
func (_m *MockProvider) Current() setting.SettingsBag {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -32,7 +32,7 @@ func (_m *MockProvider) Current() setting.SettingsBag {
|
||||
return r0
|
||||
}
|
||||
|
||||
// CurrentVerbose provides a mock function with given fields:
|
||||
// CurrentVerbose provides a mock function with no fields
|
||||
func (_m *MockProvider) CurrentVerbose() setting.VerboseSettingsBag {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.52.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package dualwrite
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -83,7 +83,7 @@ func (_c *DB_BeginTx_Call) RunAndReturn(run func(context.Context, *sql.TxOptions
|
||||
return _c
|
||||
}
|
||||
|
||||
// DriverName provides a mock function with given fields:
|
||||
// DriverName provides a mock function with no fields
|
||||
func (_m *DB) DriverName() string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -374,7 +374,7 @@ func (_c *DB_QueryRowContext_Call) RunAndReturn(run func(context.Context, string
|
||||
return _c
|
||||
}
|
||||
|
||||
// Stats provides a mock function with given fields:
|
||||
// Stats provides a mock function with no fields
|
||||
func (_m *DB) Stats() sql.DBStats {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -17,7 +17,7 @@ func (_m *Row) EXPECT() *Row_Expecter {
|
||||
return &Row_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// Err provides a mock function with given fields:
|
||||
// Err provides a mock function with no fields
|
||||
func (_m *Row) Err() error {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -17,7 +17,7 @@ func (_m *Rows) EXPECT() *Rows_Expecter {
|
||||
return &Rows_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// Close provides a mock function with given fields:
|
||||
// Close provides a mock function with no fields
|
||||
func (_m *Rows) Close() error {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -62,7 +62,7 @@ func (_c *Rows_Close_Call) RunAndReturn(run func() error) *Rows_Close_Call {
|
||||
return _c
|
||||
}
|
||||
|
||||
// Err provides a mock function with given fields:
|
||||
// Err provides a mock function with no fields
|
||||
func (_m *Rows) Err() error {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -107,7 +107,7 @@ func (_c *Rows_Err_Call) RunAndReturn(run func() error) *Rows_Err_Call {
|
||||
return _c
|
||||
}
|
||||
|
||||
// Next provides a mock function with given fields:
|
||||
// Next provides a mock function with no fields
|
||||
func (_m *Rows) Next() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -152,7 +152,7 @@ func (_c *Rows_Next_Call) RunAndReturn(run func() bool) *Rows_Next_Call {
|
||||
return _c
|
||||
}
|
||||
|
||||
// NextResultSet provides a mock function with given fields:
|
||||
// NextResultSet provides a mock function with no fields
|
||||
func (_m *Rows) NextResultSet() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -24,7 +24,7 @@ func (_m *Tx) EXPECT() *Tx_Expecter {
|
||||
return &Tx_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// Commit provides a mock function with given fields:
|
||||
// Commit provides a mock function with no fields
|
||||
func (_m *Tx) Commit() error {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -269,7 +269,7 @@ func (_c *Tx_QueryRowContext_Call) RunAndReturn(run func(context.Context, string
|
||||
return _c
|
||||
}
|
||||
|
||||
// Rollback provides a mock function with given fields:
|
||||
// Rollback provides a mock function with no fields
|
||||
func (_m *Tx) Rollback() error {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -17,7 +17,7 @@ func (_m *Result) EXPECT() *Result_Expecter {
|
||||
return &Result_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// LastInsertId provides a mock function with given fields:
|
||||
// LastInsertId provides a mock function with no fields
|
||||
func (_m *Result) LastInsertId() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -72,7 +72,7 @@ func (_c *Result_LastInsertId_Call) RunAndReturn(run func() (int64, error)) *Res
|
||||
return _c
|
||||
}
|
||||
|
||||
// RowsAffected provides a mock function with given fields:
|
||||
// RowsAffected provides a mock function with no fields
|
||||
func (_m *Result) RowsAffected() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -171,7 +171,7 @@ func (_c *SQLTemplate_ArgPlaceholder_Call) RunAndReturn(run func(int) string) *S
|
||||
return _c
|
||||
}
|
||||
|
||||
// CurrentEpoch provides a mock function with given fields:
|
||||
// CurrentEpoch provides a mock function with no fields
|
||||
func (_m *SQLTemplate) CurrentEpoch() string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -216,7 +216,7 @@ func (_c *SQLTemplate_CurrentEpoch_Call) RunAndReturn(run func() string) *SQLTem
|
||||
return _c
|
||||
}
|
||||
|
||||
// DialectName provides a mock function with given fields:
|
||||
// DialectName provides a mock function with no fields
|
||||
func (_m *SQLTemplate) DialectName() string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -261,7 +261,7 @@ func (_c *SQLTemplate_DialectName_Call) RunAndReturn(run func() string) *SQLTemp
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetArgs provides a mock function with given fields:
|
||||
// GetArgs provides a mock function with no fields
|
||||
func (_m *SQLTemplate) GetArgs() []interface{} {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -308,7 +308,7 @@ func (_c *SQLTemplate_GetArgs_Call) RunAndReturn(run func() []interface{}) *SQLT
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetColNames provides a mock function with given fields:
|
||||
// GetColNames provides a mock function with no fields
|
||||
func (_m *SQLTemplate) GetColNames() []string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -355,7 +355,7 @@ func (_c *SQLTemplate_GetColNames_Call) RunAndReturn(run func() []string) *SQLTe
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetScanDest provides a mock function with given fields:
|
||||
// GetScanDest provides a mock function with no fields
|
||||
func (_m *SQLTemplate) GetScanDest() []interface{} {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -515,7 +515,7 @@ func (_c *SQLTemplate_Into_Call) RunAndReturn(run func(reflect.Value, string) (s
|
||||
return _c
|
||||
}
|
||||
|
||||
// Reset provides a mock function with given fields:
|
||||
// Reset provides a mock function with no fields
|
||||
func (_m *SQLTemplate) Reset() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -543,7 +543,7 @@ func (_c *SQLTemplate_Reset_Call) Return() *SQLTemplate_Reset_Call {
|
||||
}
|
||||
|
||||
func (_c *SQLTemplate_Reset_Call) RunAndReturn(run func()) *SQLTemplate_Reset_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -645,11 +645,11 @@ func (_c *SQLTemplate_SetDialect_Call) Return() *SQLTemplate_SetDialect_Call {
|
||||
}
|
||||
|
||||
func (_c *SQLTemplate_SetDialect_Call) RunAndReturn(run func(sqltemplate.Dialect)) *SQLTemplate_SetDialect_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Validate provides a mock function with given fields:
|
||||
// Validate provides a mock function with no fields
|
||||
func (_m *SQLTemplate) Validate() error {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -171,7 +171,7 @@ func (_c *WithResults_ArgPlaceholder_Call[T]) RunAndReturn(run func(int) string)
|
||||
return _c
|
||||
}
|
||||
|
||||
// CurrentEpoch provides a mock function with given fields:
|
||||
// CurrentEpoch provides a mock function with no fields
|
||||
func (_m *WithResults[T]) CurrentEpoch() string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -216,7 +216,7 @@ func (_c *WithResults_CurrentEpoch_Call[T]) RunAndReturn(run func() string) *Wit
|
||||
return _c
|
||||
}
|
||||
|
||||
// DialectName provides a mock function with given fields:
|
||||
// DialectName provides a mock function with no fields
|
||||
func (_m *WithResults[T]) DialectName() string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -261,7 +261,7 @@ func (_c *WithResults_DialectName_Call[T]) RunAndReturn(run func() string) *With
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetArgs provides a mock function with given fields:
|
||||
// GetArgs provides a mock function with no fields
|
||||
func (_m *WithResults[T]) GetArgs() []interface{} {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -308,7 +308,7 @@ func (_c *WithResults_GetArgs_Call[T]) RunAndReturn(run func() []interface{}) *W
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetColNames provides a mock function with given fields:
|
||||
// GetColNames provides a mock function with no fields
|
||||
func (_m *WithResults[T]) GetColNames() []string {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -355,7 +355,7 @@ func (_c *WithResults_GetColNames_Call[T]) RunAndReturn(run func() []string) *Wi
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetScanDest provides a mock function with given fields:
|
||||
// GetScanDest provides a mock function with no fields
|
||||
func (_m *WithResults[T]) GetScanDest() []interface{} {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -515,7 +515,7 @@ func (_c *WithResults_Into_Call[T]) RunAndReturn(run func(reflect.Value, string)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Reset provides a mock function with given fields:
|
||||
// Reset provides a mock function with no fields
|
||||
func (_m *WithResults[T]) Reset() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -543,11 +543,11 @@ func (_c *WithResults_Reset_Call[T]) Return() *WithResults_Reset_Call[T] {
|
||||
}
|
||||
|
||||
func (_c *WithResults_Reset_Call[T]) RunAndReturn(run func()) *WithResults_Reset_Call[T] {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Results provides a mock function with given fields:
|
||||
// Results provides a mock function with no fields
|
||||
func (_m *WithResults[T]) Results() (T, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -563,7 +563,9 @@ func (_m *WithResults[T]) Results() (T, error) {
|
||||
if rf, ok := ret.Get(0).(func() T); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(T)
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(T)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
@@ -700,11 +702,11 @@ func (_c *WithResults_SetDialect_Call[T]) Return() *WithResults_SetDialect_Call[
|
||||
}
|
||||
|
||||
func (_c *WithResults_SetDialect_Call[T]) RunAndReturn(run func(sqltemplate.Dialect)) *WithResults_SetDialect_Call[T] {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Validate provides a mock function with given fields:
|
||||
// Validate provides a mock function with no fields
|
||||
func (_m *WithResults[T]) Validate() error {
|
||||
ret := _m.Called()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.43.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -50,11 +50,11 @@ func (_c *T_Cleanup_Call) Return() *T_Cleanup_Call {
|
||||
}
|
||||
|
||||
func (_c *T_Cleanup_Call) RunAndReturn(run func(func())) *T_Cleanup_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Deadline provides a mock function with given fields:
|
||||
// Deadline provides a mock function with no fields
|
||||
func (_m *T) Deadline() (time.Time, bool) {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -149,11 +149,11 @@ func (_c *T_Errorf_Call) Return() *T_Errorf_Call {
|
||||
}
|
||||
|
||||
func (_c *T_Errorf_Call) RunAndReturn(run func(string, ...interface{})) *T_Errorf_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// FailNow provides a mock function with given fields:
|
||||
// FailNow provides a mock function with no fields
|
||||
func (_m *T) FailNow() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -181,11 +181,11 @@ func (_c *T_FailNow_Call) Return() *T_FailNow_Call {
|
||||
}
|
||||
|
||||
func (_c *T_FailNow_Call) RunAndReturn(run func()) *T_FailNow_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Helper provides a mock function with given fields:
|
||||
// Helper provides a mock function with no fields
|
||||
func (_m *T) Helper() {
|
||||
_m.Called()
|
||||
}
|
||||
@@ -213,7 +213,7 @@ func (_c *T_Helper_Call) Return() *T_Helper_Call {
|
||||
}
|
||||
|
||||
func (_c *T_Helper_Call) RunAndReturn(run func()) *T_Helper_Call {
|
||||
_c.Call.Return(run)
|
||||
_c.Run(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user