Documentation
¶
Overview ¶
Package testhelpers provides helpers for umoci's test suite. None of the code in this package is enabled when building a non-test umoci binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FtimeGranularity ¶
FtimeGranularity is the filesystem timestamp granularity for this system. TODO: We should probably make this dependent on the path since some
filesystems can have different granularities...
func IsTestBinary ¶
func IsTestBinary() bool
IsTestBinary returns whether the current binary is a test binary. This is only ever meant to be used so that test-specific initialisations can be done inside packages. Don't use it for anything else.
func MakeReadOnly ¶
MakeReadOnly makes the given path read-only (by bind-mounting it as "ro"). TODO: This should be done through an interface restriction in the test
(which is then backed up by the readonly mount if necessary). The fact this test is necessary is a sign that we need a better split up of the CAS interface.
func MakeReadWrite ¶
MakeReadWrite undos the effect of MakeReadOnly.
func RandomString ¶
RandomString returns a pseudorandom alphabetical (mixed-case) string.
Types ¶
This section is empty.