grafana/pkg/services/store/system_users_mock.go
Serge Zaitsev 907e2a840e
Chore: Fix goimports grouping (#62429)
* fix goimports ordering

* fix goimports order
2023-01-30 09:57:50 +01:00

82 lines
2.2 KiB
Go

// Code generated by mockery v2.15.0. DO NOT EDIT.
package store
import (
mock "github.com/stretchr/testify/mock"
filestorage "github.com/grafana/grafana/pkg/infra/filestorage"
user "github.com/grafana/grafana/pkg/services/user"
)
// FakeSystemUsers is an autogenerated mock type for the SystemUsers type
type FakeSystemUsers struct {
mock.Mock
}
// GetFilter provides a mock function with given fields: _a0
func (_m *FakeSystemUsers) GetFilter(_a0 *user.SignedInUser) (map[string]filestorage.PathFilter, error) {
ret := _m.Called(_a0)
var r0 map[string]filestorage.PathFilter
if rf, ok := ret.Get(0).(func(*user.SignedInUser) map[string]filestorage.PathFilter); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]filestorage.PathFilter)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*user.SignedInUser) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetUser provides a mock function with given fields: userType, orgID
func (_m *FakeSystemUsers) GetUser(userType SystemUserType, orgID int64) (*user.SignedInUser, error) {
ret := _m.Called(userType, orgID)
var r0 *user.SignedInUser
if rf, ok := ret.Get(0).(func(SystemUserType, int64) *user.SignedInUser); ok {
r0 = rf(userType, orgID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*user.SignedInUser)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(SystemUserType, int64) error); ok {
r1 = rf(userType, orgID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RegisterUser provides a mock function with given fields: userType, filterFn
func (_m *FakeSystemUsers) RegisterUser(userType SystemUserType, filterFn func() map[string]filestorage.PathFilter) {
_m.Called(userType, filterFn)
}
type mockConstructorTestingTNewFakeSystemUsers 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 {
mock := &FakeSystemUsers{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}