Documentation ¶
Index ¶
- type Action
- type ActionToUIDs
- type MockNorduserClient
- type MockNorduserCombinedService
- func (m *MockNorduserCombinedService) CheckNoAction(filters ...Action) bool
- func (m *MockNorduserCombinedService) Disable(uid uint32) error
- func (m *MockNorduserCombinedService) DisableAll()
- func (m *MockNorduserCombinedService) Enable(uid uint32, _ uint32, _ string) error
- func (m *MockNorduserCombinedService) Restart(uid uint32) error
- func (m *MockNorduserCombinedService) Stop(uid uint32, wait bool) error
- func (m *MockNorduserCombinedService) StopAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionToUIDs ¶
ActionToUIDs maps particular action to UIDs for which this action was executed
type MockNorduserClient ¶
type MockNorduserClient struct {
// contains filtered or unexported fields
}
func NewMockNorduserClient ¶
func NewMockNorduserClient(startFileshareErr error) *MockNorduserClient
func (*MockNorduserClient) StartFileshare ¶
func (m *MockNorduserClient) StartFileshare(uid uint32) error
func (*MockNorduserClient) StopFileshare ¶
func (m *MockNorduserClient) StopFileshare(uid uint32) error
type MockNorduserCombinedService ¶
type MockNorduserCombinedService struct { ActionToUIDs ActionToUIDs EnableErr error StopErr error RestartErr error }
func NewMockNorduserCombinedService ¶
func NewMockNorduserCombinedService() MockNorduserCombinedService
func (*MockNorduserCombinedService) CheckNoAction ¶
func (m *MockNorduserCombinedService) CheckNoAction(filters ...Action) bool
CheckNoAction is a helper method for test callers, it returns true if no action was taken by the mock in its lifetime. Actions provided in the optional filters parameter will be ingored when checking.
func (*MockNorduserCombinedService) Disable ¶
func (m *MockNorduserCombinedService) Disable(uid uint32) error
func (*MockNorduserCombinedService) DisableAll ¶
func (m *MockNorduserCombinedService) DisableAll()
func (*MockNorduserCombinedService) Enable ¶
func (m *MockNorduserCombinedService) Enable(uid uint32, _ uint32, _ string) error
func (*MockNorduserCombinedService) Restart ¶
func (m *MockNorduserCombinedService) Restart(uid uint32) error
func (*MockNorduserCombinedService) Stop ¶
func (m *MockNorduserCombinedService) Stop(uid uint32, wait bool) error
func (*MockNorduserCombinedService) StopAll ¶
func (m *MockNorduserCombinedService) StopAll()
Click to show internal directories.
Click to hide internal directories.