Documentation ¶
Index ¶
- type FakeDiskUtil
- type FakeFormatter
- type FakeMountsSearcher
- type FakePartitioner
- func (p *FakePartitioner) GetDeviceSizeInBytes(devicePath string) (uint64, error)
- func (p *FakePartitioner) GetPartitions(devicePath string) (partitions []boshdisk.ExistingPartition, deviceFullSizeInBytes uint64, ...)
- func (p *FakePartitioner) Partition(devicePath string, partitions []boshdisk.Partition) error
- func (p *FakePartitioner) RemovePartitions(partitions []boshdisk.ExistingPartition, devicePath string) error
- func (p *FakePartitioner) ResizeSinglePartition(devicePath string) (err error)
- func (p *FakePartitioner) SinglePartitionNeedsResize(devicePath string, expectedPartitionType boshdisk.PartitionType) (needsResize bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeDiskUtil ¶
type FakeDiskUtil struct { GetFilesContentsFileNames []string GetFilesContentsError error GetFilesContentsContents [][]byte GetFilesContentsDiskPath string GetBlockDeviceSizeDiskPath string GetBlockDeviceSizeError error GetBlockDeviceSizeSize uint64 }
func NewFakeDiskUtil ¶
func NewFakeDiskUtil() (util *FakeDiskUtil)
func (*FakeDiskUtil) GetBlockDeviceSize ¶
func (util *FakeDiskUtil) GetBlockDeviceSize(diskPath string) (size uint64, err error)
func (*FakeDiskUtil) GetFilesContents ¶
func (util *FakeDiskUtil) GetFilesContents(diskPath string, fileNames []string) ([][]byte, error)
type FakeFormatter ¶
type FakeFormatter struct { GetFileSystemType map[string]boshdisk.FileSystemType FormatCalled bool FormatPartitionPaths []string FormatFsTypes []boshdisk.FileSystemType FormatError error GrowFilesystemCalled bool GrowFilesystemPartitionPath string GrowFilesystemError error }
func NewFakeFormatter ¶
func NewFakeFormatter() *FakeFormatter
func (*FakeFormatter) Format ¶
func (p *FakeFormatter) Format(partitionPath string, fsType boshdisk.FileSystemType) (err error)
func (*FakeFormatter) GetPartitionFormatType ¶
func (p *FakeFormatter) GetPartitionFormatType(partitionPath string) (boshdisk.FileSystemType, error)
func (*FakeFormatter) GrowFilesystem ¶
func (p *FakeFormatter) GrowFilesystem(partitionPath string) error
type FakeMountsSearcher ¶
func (*FakeMountsSearcher) SearchMounts ¶
func (s *FakeMountsSearcher) SearchMounts() ([]boshdisk.Mount, error)
type FakePartitioner ¶
type FakePartitioner struct { SinglePartitionNeedsResizeCalled bool SinglePartitionNeedsResizeDevicePath string SinglePartitionNeedsResizeExpectedPartitionType boshdisk.PartitionType SinglePartitionNeedsResizeReturns struct { NeedResize bool Err error } ResizeSinglePartitionCalled bool ResizeSinglePartitionDevicePath string ResizeSinglePartitionErr error PartitionCalled bool PartitionDevicePath string PartitionPartitions []boshdisk.Partition PartitionErr error GetDeviceSizeInBytesDevicePath string GetDeviceSizeInBytesSizes map[string]uint64 GetDeviceSizeInBytesErr error GetPartitionsPartitions []boshdisk.ExistingPartition GetPartitionsSizes map[string]uint64 GetPartitionsErr error RemovePartitionsCalled bool RemoveExistingPartition []boshdisk.ExistingPartition RemovePartitionsErr error }
func NewFakePartitioner ¶
func NewFakePartitioner() *FakePartitioner
func (*FakePartitioner) GetDeviceSizeInBytes ¶
func (p *FakePartitioner) GetDeviceSizeInBytes(devicePath string) (uint64, error)
func (*FakePartitioner) GetPartitions ¶
func (p *FakePartitioner) GetPartitions(devicePath string) (partitions []boshdisk.ExistingPartition, deviceFullSizeInBytes uint64, err error)
func (*FakePartitioner) Partition ¶
func (p *FakePartitioner) Partition(devicePath string, partitions []boshdisk.Partition) error
func (*FakePartitioner) RemovePartitions ¶
func (p *FakePartitioner) RemovePartitions(partitions []boshdisk.ExistingPartition, devicePath string) error
func (*FakePartitioner) ResizeSinglePartition ¶
func (p *FakePartitioner) ResizeSinglePartition(devicePath string) (err error)
func (*FakePartitioner) SinglePartitionNeedsResize ¶
func (p *FakePartitioner) SinglePartitionNeedsResize(devicePath string, expectedPartitionType boshdisk.PartitionType) (needsResize bool, err error)
Click to show internal directories.
Click to hide internal directories.