The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/store/system_users_mock.go

81 lines
2.2 KiB

// 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
}