mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Move store interface to top level (#83153)
* Chore: Move store interface to top level * Update store mock
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
// Code generated by mockery v2.20.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.0. DO NOT EDIT.
|
||||
|
||||
package actest
|
||||
|
||||
import (
|
||||
accesscontrol "github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
|
||||
context "context"
|
||||
|
||||
accesscontrol "github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// MockStore is an autogenerated mock type for the store type
|
||||
// MockStore is an autogenerated mock type for the Store type
|
||||
type MockStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
@@ -19,6 +19,10 @@ type MockStore struct {
|
||||
func (_m *MockStore) DeleteExternalServiceRole(ctx context.Context, externalServiceID string) error {
|
||||
ret := _m.Called(ctx, externalServiceID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteExternalServiceRole")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, externalServiceID)
|
||||
@@ -33,6 +37,10 @@ func (_m *MockStore) DeleteExternalServiceRole(ctx context.Context, externalServ
|
||||
func (_m *MockStore) DeleteUserPermissions(ctx context.Context, orgID int64, userID int64) error {
|
||||
ret := _m.Called(ctx, orgID, userID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteUserPermissions")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, orgID, userID)
|
||||
@@ -47,6 +55,10 @@ func (_m *MockStore) DeleteUserPermissions(ctx context.Context, orgID int64, use
|
||||
func (_m *MockStore) GetUserPermissions(ctx context.Context, query accesscontrol.GetUserPermissionsQuery) ([]accesscontrol.Permission, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetUserPermissions")
|
||||
}
|
||||
|
||||
var r0 []accesscontrol.Permission
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, accesscontrol.GetUserPermissionsQuery) ([]accesscontrol.Permission, error)); ok {
|
||||
@@ -73,6 +85,10 @@ func (_m *MockStore) GetUserPermissions(ctx context.Context, query accesscontrol
|
||||
func (_m *MockStore) GetUsersBasicRoles(ctx context.Context, userFilter []int64, orgID int64) (map[int64][]string, error) {
|
||||
ret := _m.Called(ctx, userFilter, orgID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetUsersBasicRoles")
|
||||
}
|
||||
|
||||
var r0 map[int64][]string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []int64, int64) (map[int64][]string, error)); ok {
|
||||
@@ -99,6 +115,10 @@ func (_m *MockStore) GetUsersBasicRoles(ctx context.Context, userFilter []int64,
|
||||
func (_m *MockStore) SaveExternalServiceRole(ctx context.Context, cmd accesscontrol.SaveExternalServiceRoleCommand) error {
|
||||
ret := _m.Called(ctx, cmd)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SaveExternalServiceRole")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, accesscontrol.SaveExternalServiceRoleCommand) error); ok {
|
||||
r0 = rf(ctx, cmd)
|
||||
@@ -113,6 +133,10 @@ func (_m *MockStore) SaveExternalServiceRole(ctx context.Context, cmd accesscont
|
||||
func (_m *MockStore) SearchUsersPermissions(ctx context.Context, orgID int64, options accesscontrol.SearchOptions) (map[int64][]accesscontrol.Permission, error) {
|
||||
ret := _m.Called(ctx, orgID, options)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SearchUsersPermissions")
|
||||
}
|
||||
|
||||
var r0 map[int64][]accesscontrol.Permission
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, accesscontrol.SearchOptions) (map[int64][]accesscontrol.Permission, error)); ok {
|
||||
@@ -135,13 +159,12 @@ func (_m *MockStore) SearchUsersPermissions(ctx context.Context, orgID int64, op
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMockStore interface {
|
||||
// NewMockStore creates a new instance of MockStore. 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 NewMockStore(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMockStore creates a new instance of MockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMockStore(t mockConstructorTestingTNewMockStore) *MockStore {
|
||||
}) *MockStore {
|
||||
mock := &MockStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user