# Functions
AppendCovEnv returns the env needed to enable coverage when running a go binary, if coverage is enabled.
BuildDaemon builds the daemon executable and returns the binary path.
CanRunRustTests returns if we can run rust tests via cargo on this machine.
CoverDirEnv returns the cover dir env variable to run a go binary, if coverage is enabled.
CoverDirForTests parses the test arguments and return the cover profile directory, if coverage is enabled.
CurrentDir returns the current file directory.
GenerateEncryptionKey returns an encryption key that can be used in tests.
GenerateSessionID returns a sessionID that can be used in tests.
GetSystemBusConnection returns a connection to the system bus with a safety check to avoid mistakenly connecting to the actual system bus.
GoldenPath returns the golden path for the provided test.
IsVerbose returns whether the tests are running in verbose mode.
LoadWithUpdateFromGolden loads the element from a plaintext golden file.
LoadWithUpdateFromGoldenYAML load the generic element from a YAML serialized golden file.
MakeReadOnly makes dest read only and restore permission on cleanup.
NormalizeName transforms name input with illegal characters replaced or removed.
ProjectRoot returns the absolute path to the project root.
RunDaemon runs the daemon in a separate process and returns the socket path and a channel that will be closed when the daemon stops.
StartBusBrokerMock starts the D-Bus service and exports it on the system bus.
StartBusMock starts a mock dbus daemon and returns its address and a cancel function to stop it.
StartSystemBusMock starts a mock dbus daemon and returns a cancel function to stop it.
TestFamilyPath returns the path of the dir for storing fixtures and other files related to the test.
TrackRustCoverage returns environment variables and target directory so that following commands runs with code coverage enabled.
UpdateEnabled returns true if updating the golden files is requested.
WithCachePath overrides the default cache path of the daemon.
WithEnvironment overrides the default environment of the daemon.
WithGoldenPath overrides the default path for golden files used.
WithPreviousDBState initializes the cache of the daemon with a preexistent database.
WithSocketPath overrides the default socket path of the daemon.
# Constants
IDSeparator is the value used to append values to the sessionID in the broker mock.
UpdateGoldenFilesEnv is the environment variable used to indicate go test that the golden files should be overwritten with the current test results.
# Structs
BrokerBusMock is the D-Bus object that will answer calls for the broker mock.
# Type aliases
DaemonOption represents an optional function that can be used to override some of the daemon default values.
GoldenOption is a supported option reference to change the golden files comparison.