fakes

package
v2.108.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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 {
	FormatCalled         bool
	FormatPartitionPaths []string
	FormatFsTypes        []boshdisk.FileSystemType
	FormatError          error
}

func (*FakeFormatter) Format

func (p *FakeFormatter) Format(partitionPath string, fsType boshdisk.FileSystemType) (err error)

type FakeMountsSearcher

type FakeMountsSearcher struct {
	SearchMountsMounts []boshdisk.Mount
	SearchMountsErr    error
}

func (*FakeMountsSearcher) SearchMounts

func (s *FakeMountsSearcher) SearchMounts() ([]boshdisk.Mount, error)

type FakePartitioner

type FakePartitioner struct {
	PartitionCalled     bool
	PartitionDevicePath string
	PartitionPartitions []boshdisk.Partition
	PartitionErr        error

	GetDeviceSizeInBytesDevicePath string
	GetDeviceSizeInBytesSizes      map[string]uint64
	GetDeviceSizeInBytesErr        error
}

func NewFakePartitioner

func NewFakePartitioner() *FakePartitioner

func (*FakePartitioner) GetDeviceSizeInBytes

func (p *FakePartitioner) GetDeviceSizeInBytes(devicePath string) (uint64, error)

func (*FakePartitioner) Partition

func (p *FakePartitioner) Partition(devicePath string, partitions []boshdisk.Partition) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL