Documentation ¶
Overview ¶
Package shillscript has helper functions and the dbus monitor implementation for the shill init scripts tests.
Index ¶
- Constants
- func AssureExists(path string) error
- func AssureIsDir(path string) error
- func AssureIsLink(path string) error
- func AssureIsLinkTo(path, pointee string) error
- func AssureMethodCalls(ctx context.Context, expectedMethodCalls []string, ...) error
- func AssureNotExists(path string) error
- func AssurePathGroup(path, group string) error
- func AssurePathOwner(path, owner string) error
- func CreateFileWithContents(fileName, contents string) error
- func DbusEventMonitor(ctx context.Context) (func() ([]dbusutil.CalledMethod, error), error)
- func GetProfileList(ctx context.Context) ([]*shill.Profile, error)
- func RunTest(ctx context.Context, fn testFuncType, isGuest bool) error
- func Touch(filename string) error
- type TestEnv
Constants ¶
const ( FakeUser = chrome.DefaultUser GuestUser = cryptohome.GuestUser CryptohomePathCommand = "/usr/sbin/cryptohome-path" DaemonStoreBase = "/run/daemon-store/shill" ShillUserProfilesDir = "/run/shill/user_profiles" ShillUserProfileChronosDir = "/run/shill/user_profiles/chronos" ChronosProfileName = "~chronos/shill" ExpectedProfileName = "/profile/chronos/shill" DbusMonitorTimeout = 30 * time.Second CreateUserProfile = "CreateProfile" InsertUserProfile = "InsertUserProfile" PopAllUserProfiles = "PopAllUserProfiles" )
The FakeUser/GuestUser are used to simulate a regular/guest user login.
Variables ¶
This section is empty.
Functions ¶
func AssureIsDir ¶
AssureIsDir asserts that path is a directory.
func AssureIsLink ¶
AssureIsLink asserts that path is a symbolic link.
func AssureIsLinkTo ¶
AssureIsLinkTo asserts that path is a symbolic link to pointee.
func AssureMethodCalls ¶
func AssureMethodCalls(ctx context.Context, expectedMethodCalls []string, calledMethods []dbusutil.CalledMethod) error
AssureMethodCalls assure that the expected methods are called.
func AssureNotExists ¶
AssureNotExists asserts that path doesn't exist.
func AssurePathGroup ¶
AssurePathGroup asserts that path is owned by group.
func AssurePathOwner ¶
AssurePathOwner asserts that path is owned by owner.
func CreateFileWithContents ¶
CreateFileWithContents creates a file named |filename| that contains contents.
func DbusEventMonitor ¶
DbusEventMonitor monitors the system message bus for those D-Bus calls we want to observe (InsertUserProfile, PopAllUserProfiles, CreateUserProfile). It returns a stop function and error. The stop function stops the D-Bus monitor and return the called methods and/or error.
func GetProfileList ¶
GetProfileList return the profiles in the profile stack.