Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidUser = &user.User{HomeDir: "/home/foo", Username: "foo"}
ValidUser is a shared test fixture representing a valid OS user.
Functions ¶
This section is empty.
Types ¶
type MockUserLookup ¶
type MockUserLookup struct {
// User is returned on any call to Lookup() if Error is nil.
User *user.User
// Error, if non-nil, is returned on any call to Lookup().
Error error
}
MockUserLookup implements policy.UserLookup for testing.
- Set [User] for a default user returned on any Lookup call.
- Set [Error] to force every Lookup call to fail.
func (*MockUserLookup) Lookup ¶
func (m *MockUserLookup) Lookup(username string) (*user.User, error)
Lookup implements policy.UserLookup.
Click to show internal directories.
Click to hide internal directories.