fakes

package
v2.81.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeDiskManager added in v0.0.24

type FakeDiskManager struct {
	FakeEphemeralPartitioner  *FakePartitioner
	FakePersistentPartitioner *FakePartitioner
	FakeFormatter             *FakeFormatter
	FakeMounter               *FakeMounter
	FakeMountsSearcher        *FakeMountsSearcher
	FakeRootDevicePartitioner *FakePartitioner
	FakeDiskUtil              *FakeDiskUtil
}

func NewFakeDiskManager added in v0.0.24

func NewFakeDiskManager() *FakeDiskManager

func (*FakeDiskManager) GetEphemeralDevicePartitioner

func (m *FakeDiskManager) GetEphemeralDevicePartitioner() boshdisk.Partitioner

func (*FakeDiskManager) GetFormatter added in v0.0.24

func (m *FakeDiskManager) GetFormatter() boshdisk.Formatter

func (*FakeDiskManager) GetMounter added in v0.0.24

func (m *FakeDiskManager) GetMounter() boshdisk.Mounter

func (*FakeDiskManager) GetMountsSearcher added in v0.0.24

func (m *FakeDiskManager) GetMountsSearcher() boshdisk.MountsSearcher

func (*FakeDiskManager) GetPersistentDevicePartitioner

func (m *FakeDiskManager) GetPersistentDevicePartitioner() boshdisk.Partitioner

func (*FakeDiskManager) GetRootDevicePartitioner added in v0.0.24

func (m *FakeDiskManager) GetRootDevicePartitioner() boshdisk.Partitioner

func (*FakeDiskManager) GetUtil

func (m *FakeDiskManager) GetUtil() boshdisk.Util

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 FakeMounter added in v0.0.24

type FakeMounter struct {
	MountCalled         bool
	MountPartitionPaths []string
	MountMountPoints    []string
	MountMountOptions   [][]string
	MountErr            error

	MountFilesystemCalled         bool
	MountFilesystemPartitionPaths []string
	MountFilesystemMountPoints    []string
	MountFilesystemFstypes        []string
	MountFilesystemMountOptions   [][]string
	MountFilesystemErr            error

	RemountInPlaceCalled       bool
	RemountInPlaceMountPoints  []string
	RemountInPlaceMountOptions [][]string
	RemountInPlaceErr          error

	RemountAsReadonlyCalled bool
	RemountAsReadonlyPath   string
	RemountAsReadonlyErr    error

	RemountFromMountPoint string
	RemountToMountPoint   string
	RemountMountOptions   []string
	RemountErr            error

	SwapOnPartitionPaths []string
	SwapOnErr            error

	UnmountPartitionPathOrMountPoint string
	UnmountDidUnmount                bool
	UnmountErr                       error

	IsMountPointPath          string
	IsMountPointPartitionPath string
	IsMountPointResult        bool
	IsMountPointErr           error

	IsMountedResult bool
	IsMountedErr    error
	IsMountedStub   func(string) (bool, error)
	// contains filtered or unexported fields
}

func (*FakeMounter) IsMountPoint added in v0.0.24

func (m *FakeMounter) IsMountPoint(path string) (partitionPath string, result bool, err error)

func (*FakeMounter) IsMounted added in v0.0.24

func (m *FakeMounter) IsMounted(devicePathOrMountPoint string) (bool, error)

func (*FakeMounter) IsMountedArgsForCall added in v0.0.24

func (m *FakeMounter) IsMountedArgsForCall(callNumber int) string

func (*FakeMounter) Mount added in v0.0.24

func (m *FakeMounter) Mount(partitionPath, mountPoint string, mountOptions ...string) error

func (*FakeMounter) MountFilesystem

func (m *FakeMounter) MountFilesystem(partitionPath, mountPoint, fstype string, mountOptions ...string) error

func (*FakeMounter) Remount added in v0.0.24

func (m *FakeMounter) Remount(fromMountPoint, toMountPoint string, mountOptions ...string) (err error)

func (*FakeMounter) RemountAsReadonly added in v0.0.24

func (m *FakeMounter) RemountAsReadonly(mountPoint string) (err error)

func (*FakeMounter) RemountInPlace added in v0.0.24

func (m *FakeMounter) RemountInPlace(mountPoint string, mountOptions ...string) error

func (*FakeMounter) SwapOn added in v0.0.24

func (m *FakeMounter) SwapOn(partitionPath string) (err error)

func (*FakeMounter) Unmount added in v0.0.24

func (m *FakeMounter) Unmount(partitionPathOrMountPoint string) (didUnmount bool, 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