Documentation ¶
Overview ¶
Package testhelper provides helpers to ease mocking functions and methods provided by packages such as os or http.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOSMock ¶
func NewOSMock(conf *OSMockConf) *osMock
Types ¶
type OSMockConf ¶
type OSMockConf struct { OsutilCopySpecialFileThreshold uint ReadDirThreshold uint RemoveThreshold uint RemoveAllThreshold uint TruncateThreshold uint OpenFileThreshold uint MkdirAllThreshold uint HttpGetThreshold uint ReadAllThreshold uint }
OSMockConf enables setting thresholds to indicate how many calls a the mocked functions should accept before returning an error. See osMock methods for specific behaviors.
type PartitionTable ¶
type SfDiskPartitions ¶
type SfdiskOutput ¶
type SfdiskOutput struct {
PartitionTable PartitionTable
}
Click to show internal directories.
Click to hide internal directories.