Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropPrivilege ¶
DropPrivilege drops privilege. Use this at the start of a test that does not require elevated privileges. A matching call to ResetPrivilege must occur before the test completes (a defer statement is recommended.)
func EnsurePrivilege ¶
EnsurePrivilege ensures elevated privileges are available during a test.
func ResetPrivilege ¶
ResetPrivilege returns effective privilege to the original user.
func WithPrivilege ¶
WithPrivilege wraps the supplied test function with calls to ensure the test is run with elevated privileges.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.