fakes

package
v2.30.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAuditLogger

type FakeAuditLogger struct {
	DebugMsgs []string
	ErrMsgs   []string
	// contains filtered or unexported fields
}

func NewFakeAuditLogger

func NewFakeAuditLogger() *FakeAuditLogger

func (*FakeAuditLogger) Debug

func (f *FakeAuditLogger) Debug(msg string)

func (*FakeAuditLogger) Err

func (f *FakeAuditLogger) Err(msg string)

func (*FakeAuditLogger) GetDebugMsgs

func (f *FakeAuditLogger) GetDebugMsgs() []string

func (*FakeAuditLogger) GetErrMsgs

func (f *FakeAuditLogger) GetErrMsgs() []string

func (*FakeAuditLogger) StartLogging

func (f *FakeAuditLogger) StartLogging()

type FakeAuditLoggerProvider

type FakeAuditLoggerProvider struct {
	// contains filtered or unexported fields
}

func NewFakeAuditLoggerProvider

func NewFakeAuditLoggerProvider() *FakeAuditLoggerProvider

func (*FakeAuditLoggerProvider) GetDebugLogsAt

func (p *FakeAuditLoggerProvider) GetDebugLogsAt(index int) string

func (*FakeAuditLoggerProvider) GetErrorLogsAt

func (p *FakeAuditLoggerProvider) GetErrorLogsAt(index int) string

func (*FakeAuditLoggerProvider) ProvideDebugLogger

func (p *FakeAuditLoggerProvider) ProvideDebugLogger() (*log.Logger, error)

func (*FakeAuditLoggerProvider) ProvideErrorLogger

func (p *FakeAuditLoggerProvider) ProvideErrorLogger() (*log.Logger, error)

func (*FakeAuditLoggerProvider) SetDebugLoggerError

func (p *FakeAuditLoggerProvider) SetDebugLoggerError(err error)

func (*FakeAuditLoggerProvider) SetErrorLoggerError

func (p *FakeAuditLoggerProvider) SetErrorLoggerError(err error)

type FakePlatform

type FakePlatform struct {
	Fs                *fakesys.FakeFileSystem
	Runner            *fakesys.FakeCmdRunner
	FakeCompressor    *fakecmd.FakeCompressor
	FakeCopier        *fakecmd.FakeCopier
	FakeVitalsService *fakevitals.FakeService

	DevicePathResolver boshdpresolv.DevicePathResolver

	SetupRuntimeConfigurationWasInvoked bool

	CreateUserUsername string
	CreateUserBasePath string

	AddUserToGroupsGroups             map[string][]string
	DeleteEphemeralUsersMatchingRegex string
	SetupSSHPublicKeys                map[string][]string

	SetupSSHCalled    bool
	SetupSSHPublicKey []string
	SetupSSHUsername  string
	SetupSSHErr       error

	UserPasswords         map[string]string
	SetupHostnameHostname string

	SetupIPv6Config boshsettings.IPv6
	SetupIPv6Error  error

	SaveDNSRecordsError      error
	SaveDNSRecordsHostname   string
	SaveDNSRecordsDNSRecords boshsettings.DNSRecords

	SetTimeWithNtpServersServers []string

	SetupEphemeralDiskWithPathDevicePath string
	SetupEphemeralDiskWithPathSwapSize   *uint64
	SetupEphemeralDiskWithPathErr        error

	SetupRawEphemeralDisksDevices   []boshsettings.DiskSettings
	SetupRawEphemeralDisksErr       error
	SetupRawEphemeralDisksCallCount int

	SetupDataDirCalled bool
	SetupDataDirErr    error

	SetupTmpDirCalled bool
	SetupTmpDirErr    error

	SetupHomeDirCalled bool
	SetupHomeDirErr    error

	SetupBlobsDirCalled bool
	SetupBlobsDirErr    error

	SetupLogDirCalled bool
	SetupLogDirErr    error

	SetupLoggingAndAuditingCalled bool
	SetupLoggingAndAuditingErr    error

	SetupNetworkingCalled   bool
	SetupNetworkingNetworks boshsettings.Networks
	SetupNetworkingErr      error

	MountPersistentDiskCalled     bool
	MountPersistentDiskSettings   boshsettings.DiskSettings
	MountPersistentDiskMountPoint string
	MountPersistentDiskErr        error

	UnmountPersistentDiskDidUnmount bool
	UnmountPersistentDiskSettings   boshsettings.DiskSettings

	GetFileContentsFromCDROMPath        string
	GetFileContentsFromCDROMContents    []byte
	GetFileContentsFromCDROMErr         error
	GetFileContentsFromCDROMCalledTimes int

	GetFileContentsFromDiskDiskPaths   []string
	GetFileContentsFromDiskFileNames   [][]string
	GetFileContentsFromDiskContents    map[string][]byte
	GetFileContentsFromDiskErrs        map[string]error
	GetFileContentsFromDiskCalledTimes int

	GetEphemeralDiskPathCalled   bool
	GetEphemeralDiskPathSettings boshsettings.DiskSettings
	GetEphemeralDiskPathRealPath string

	ScsiDiskMap map[string]string

	MigratePersistentDiskFromMountPoint string
	MigratePersistentDiskToMountPoint   string

	IsPersistentDiskMountableResult bool
	IsPersistentDiskMountableErr    error

	AssociateDiskCallCount int
	AssociateDiskArgs      []struct {
		// contains filtered or unexported fields
	}
	AssociateDiskError error

	IsMountPointPath          string
	IsMountPointPartitionPath string
	IsMountPointResult        bool
	IsMountPointErr           error

	PackageFileListPath           string
	IsRemoveDevToolsCalled        bool
	IsRemoveDevToolsError         error
	IsRemoveStaticLibrariesCalled bool
	IsRemoveStaticLibrariesError  error

	MountedDevicePaths []string

	StartMonitStarted           bool
	SetupMonitUserSetup         bool
	GetMonitCredentialsUsername string
	GetMonitCredentialsPassword string

	PrepareForNetworkingChangeCalled bool
	PrepareForNetworkingChangeErr    error

	GetDefaultNetworkNetwork boshsettings.Network
	GetDefaultNetworkErr     error

	GetConfiguredNetworkInterfacesInterfaces []string
	GetConfiguredNetworkInterfacesErr        error

	LastIPDeletedFromARP    string
	DeleteARPEntryWithIPErr error

	GetHostPublicKeyValue string
	GetHostPublicKeyError error

	SetupRootDiskCalledTimes int
	SetupRootDiskError       error

	SetupRecordsJSONPermissionPath string
	SetupRecordsJSONPermissionErr  error
	// contains filtered or unexported fields
}

func NewFakePlatform

func NewFakePlatform() (platform *FakePlatform)

func (*FakePlatform) AddUserToGroups

func (p *FakePlatform) AddUserToGroups(username string, groups []string) (err error)

func (*FakePlatform) AssociateDisk

func (p *FakePlatform) AssociateDisk(name string, settings boshsettings.DiskSettings) error

func (*FakePlatform) AssociateDiskArgsForCall

func (p *FakePlatform) AssociateDiskArgsForCall(i int) (string, boshsettings.DiskSettings)

func (*FakePlatform) CreateUser

func (p *FakePlatform) CreateUser(username, basePath string) (err error)

func (*FakePlatform) DeleteARPEntryWithIP

func (p *FakePlatform) DeleteARPEntryWithIP(ip string) error

func (*FakePlatform) DeleteEphemeralUsersMatching

func (p *FakePlatform) DeleteEphemeralUsersMatching(regex string) (err error)

func (*FakePlatform) GetAuditLogger

func (p *FakePlatform) GetAuditLogger() platform.AuditLogger

func (*FakePlatform) GetCertManager

func (p *FakePlatform) GetCertManager() (certManager boshcert.Manager)

func (*FakePlatform) GetCompressor

func (p *FakePlatform) GetCompressor() (compressor boshcmd.Compressor)

func (*FakePlatform) GetConfiguredNetworkInterfaces

func (p *FakePlatform) GetConfiguredNetworkInterfaces() ([]string, error)

func (*FakePlatform) GetCopier

func (p *FakePlatform) GetCopier() (copier boshcmd.Copier)

func (*FakePlatform) GetDefaultNetwork

func (p *FakePlatform) GetDefaultNetwork() (boshsettings.Network, error)

func (*FakePlatform) GetDevicePathResolver

func (p *FakePlatform) GetDevicePathResolver() (devicePathResolver boshdpresolv.DevicePathResolver)

func (*FakePlatform) GetDirProvider

func (p *FakePlatform) GetDirProvider() (dirProvider boshdir.Provider)

func (*FakePlatform) GetEphemeralDiskPath

func (p *FakePlatform) GetEphemeralDiskPath(diskSettings boshsettings.DiskSettings) string

func (*FakePlatform) GetFileContentsFromCDROM

func (p *FakePlatform) GetFileContentsFromCDROM(path string) ([]byte, error)

func (*FakePlatform) GetFilesContentsFromDisk

func (p *FakePlatform) GetFilesContentsFromDisk(diskPath string, fileNames []string) ([][]byte, error)

func (*FakePlatform) GetFs

func (p *FakePlatform) GetFs() (fs boshsys.FileSystem)

func (*FakePlatform) GetHostPublicKey

func (p *FakePlatform) GetHostPublicKey() (string, error)

func (*FakePlatform) GetMonitCredentials

func (p *FakePlatform) GetMonitCredentials() (username, password string, err error)

func (*FakePlatform) GetPersistentDiskFS

func (p *FakePlatform) GetPersistentDiskFS() (fsType string)

func (*FakePlatform) GetRunner

func (p *FakePlatform) GetRunner() (runner boshsys.CmdRunner)

func (*FakePlatform) GetVitalsService

func (p *FakePlatform) GetVitalsService() (service boshvitals.Service)

func (*FakePlatform) IsMountPoint

func (p *FakePlatform) IsMountPoint(path string) (string, bool, error)

func (*FakePlatform) IsPersistentDiskMountable

func (p *FakePlatform) IsPersistentDiskMountable(diskSettings boshsettings.DiskSettings) (bool, error)

func (*FakePlatform) IsPersistentDiskMounted

func (p *FakePlatform) IsPersistentDiskMounted(diskSettings boshsettings.DiskSettings) (result bool, err error)

func (*FakePlatform) MigratePersistentDisk

func (p *FakePlatform) MigratePersistentDisk(fromMountPoint, toMountPoint string) (err error)

func (*FakePlatform) MountPersistentDisk

func (p *FakePlatform) MountPersistentDisk(diskSettings boshsettings.DiskSettings, mountPoint string) (err error)

func (*FakePlatform) PrepareForNetworkingChange

func (p *FakePlatform) PrepareForNetworkingChange() error

func (*FakePlatform) RemoveDevTools

func (p *FakePlatform) RemoveDevTools(packageFileListPath string) error

func (*FakePlatform) RemoveStaticLibraries

func (p *FakePlatform) RemoveStaticLibraries(packageFileListPath string) error

func (*FakePlatform) SaveDNSRecords

func (p *FakePlatform) SaveDNSRecords(dnsRecords boshsettings.DNSRecords, hostname string) error

func (*FakePlatform) SetGetFilesContentsFromDisk

func (p *FakePlatform) SetGetFilesContentsFromDisk(fileName string, contents []byte, err error)

func (*FakePlatform) SetIsPersistentDiskMountable

func (p *FakePlatform) SetIsPersistentDiskMountable(isPartitioned bool, err error)

func (*FakePlatform) SetTimeWithNtpServers

func (p *FakePlatform) SetTimeWithNtpServers(servers []string) (err error)

func (*FakePlatform) SetUserPassword

func (p *FakePlatform) SetUserPassword(user, encryptedPwd string) (err error)

func (*FakePlatform) SetupBlobsDir

func (p *FakePlatform) SetupBlobsDir() error

func (*FakePlatform) SetupDataDir

func (p *FakePlatform) SetupDataDir() error

func (*FakePlatform) SetupEphemeralDiskWithPath

func (p *FakePlatform) SetupEphemeralDiskWithPath(devicePath string, desiredSwapSizeInBytes *uint64) (err error)

func (*FakePlatform) SetupHomeDir

func (p *FakePlatform) SetupHomeDir() error

func (*FakePlatform) SetupHostname

func (p *FakePlatform) SetupHostname(hostname string) (err error)

func (*FakePlatform) SetupIPv6 added in v0.0.34

func (p *FakePlatform) SetupIPv6(config boshsettings.IPv6) error

func (*FakePlatform) SetupLogDir

func (p *FakePlatform) SetupLogDir() error

func (*FakePlatform) SetupLoggingAndAuditing

func (p *FakePlatform) SetupLoggingAndAuditing() error

func (*FakePlatform) SetupLogrotate

func (p *FakePlatform) SetupLogrotate(groupName, basePath, size string) (err error)

func (*FakePlatform) SetupMonitUser

func (p *FakePlatform) SetupMonitUser() (err error)

func (*FakePlatform) SetupNetworking

func (p *FakePlatform) SetupNetworking(networks boshsettings.Networks) error

func (*FakePlatform) SetupRawEphemeralDisks

func (p *FakePlatform) SetupRawEphemeralDisks(devices []boshsettings.DiskSettings) (err error)

func (*FakePlatform) SetupRecordsJSONPermission

func (p *FakePlatform) SetupRecordsJSONPermission(path string) error

func (*FakePlatform) SetupRootDisk

func (p *FakePlatform) SetupRootDisk(ephemeralDiskPath string) (err error)

func (*FakePlatform) SetupRuntimeConfiguration

func (p *FakePlatform) SetupRuntimeConfiguration() (err error)

func (*FakePlatform) SetupSSH

func (p *FakePlatform) SetupSSH(publicKey []string, username string) error

func (*FakePlatform) SetupTmpDir

func (p *FakePlatform) SetupTmpDir() error

func (*FakePlatform) StartMonit

func (p *FakePlatform) StartMonit() (err error)

func (*FakePlatform) UnmountPersistentDisk

func (p *FakePlatform) UnmountPersistentDisk(diskSettings boshsettings.DiskSettings) (didUnmount bool, err error)

Jump to

Keyboard shortcuts

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