package
0.0.0-20210901121411-37033d0099ad
Repository: https://github.com/bazelbuild/sandboxfs.git
Documentation: pkg.go.dev
# Functions
Atime obtains the access time from a system-specific stat structure.
Btime obtains the birth time from a system-specific stat structure.
CreateFileAsUser creates the given file, running the operation as the given user.
Ctime obtains the inode change time from a system-specific stat structure.
DirEntryNamesEqual checks if the names of the entries in the given directory match the expected names in the given slice.
DirEquals checks if the contents of two directories are the same.
FileEquals checks if a file matches the expected contents.
FileExistsAsUser checks if the given path is accessible by the given user.
GetConfig returns the singleon instance of the test configuration.
LookupUID looks up a user by UID.
LookupUser looks up a user by username.
LookupUserOtherThan searches for a user whose username is different than all given ones.
MatchesRegexp returns true if the given string s matches the pattern.
MkdirAsUser creates the given directory, running the operation as the given user.
MkfifoAsUser creates the given named pipe, running the operation as the given user.
MountSetup initializes a test that runs sandboxfs in the background with default settings.
MountSetupWithOutputs initializes a test that runs sandboxfs in the background with output redirections.
MountSetupWithRootSetup initializes a test that runs sandboxfs in the background and provides a mechanism to configure the root directory before sandboxfs is started.
MountSetupWithUser initializes a test that runs sandboxfs in the background with different credentials.
MoveAsUser moves the given file, running the operation as the given user.
Mtime obtains the modification time from a system-specific stat structure.
MustMkdirAll wraps os.MkdirAll and immediately fails the test case on failure.
MustSymlink wraps os.Symlink and immediately fails the test case on failure.
MustWriteFile wraps ioutil.WriteFile and immediately fails the test case on failure.
RequireRoot checks if the test is running as root and skips the test with the given reason otherwise.
RunAndWait invokes sandboxfs with the given arguments and waits for termination.
SetConfigFromFlags initializes the test configuration based on the raw values provided by the user on the command line.
SetCredential updates the spawn attributes of the given command to execute such command under the credentials of the given user.
SymlinkAsUser creates the given symlink, running the operation as the given user.
Unmount unmounts the given file system.
WriteErrorForUnwritableNode returns the expected error for operations that cannot succeed on unwritable nodes.
# Variables
MissingXattrErr is the errno we expect on a getxattr call for a missing extended attribute.
ZeroBtime indicates that the given timestamp could not be queried.
# Structs
Config represents the configuration for the integration tests as provided in the command line.
MountState holds runtime information for tests that execute sandboxfs in the background and need to interact with a temporary directory where external files can be placed, and with the mount point.
UnixUser represents a Unix user account.