fakes

package
v2.94.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 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 added in v0.0.24

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

func NewFakePlatform() (platform *FakePlatform)

func (*FakePlatform) AddUserToGroups added in v0.0.24

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

func (*FakePlatform) AssociateDisk added in v0.0.24

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

func (*FakePlatform) AssociateDiskArgsForCall added in v0.0.24

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

func (*FakePlatform) CreateUser added in v0.0.24

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

func (*FakePlatform) DeleteARPEntryWithIP added in v0.0.24

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

func (*FakePlatform) DeleteEphemeralUsersMatching added in v0.0.24

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

func (*FakePlatform) GetAuditLogger added in v0.0.24

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

func (*FakePlatform) GetCertManager added in v0.0.24

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

func (*FakePlatform) GetCompressor added in v0.0.24

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

func (*FakePlatform) GetConfiguredNetworkInterfaces added in v0.0.24

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

func (*FakePlatform) GetCopier added in v0.0.24

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

func (*FakePlatform) GetDefaultNetwork added in v0.0.24

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

func (*FakePlatform) GetDevicePathResolver added in v0.0.24

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

func (*FakePlatform) GetDirProvider added in v0.0.24

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

func (*FakePlatform) GetEphemeralDiskPath added in v0.0.24

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

func (*FakePlatform) GetFileContentsFromCDROM added in v0.0.24

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

func (*FakePlatform) GetFilesContentsFromDisk added in v0.0.24

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

func (*FakePlatform) GetFs added in v0.0.24

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

func (*FakePlatform) GetHostPublicKey added in v0.0.24

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

func (*FakePlatform) GetMonitCredentials added in v0.0.24

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

func (*FakePlatform) GetPersistentDiskFS added in v0.0.24

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

func (*FakePlatform) GetRunner added in v0.0.24

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

func (*FakePlatform) GetVitalsService added in v0.0.24

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

func (*FakePlatform) IsMountPoint added in v0.0.24

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

func (*FakePlatform) IsPersistentDiskMountable added in v0.0.24

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

func (*FakePlatform) IsPersistentDiskMounted added in v0.0.24

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

func (*FakePlatform) MigratePersistentDisk added in v0.0.24

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

func (*FakePlatform) MountPersistentDisk added in v0.0.24

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

func (*FakePlatform) PrepareForNetworkingChange added in v0.0.24

func (p *FakePlatform) PrepareForNetworkingChange() error

func (*FakePlatform) RemoveDevTools added in v0.0.24

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

func (*FakePlatform) RemoveStaticLibraries added in v0.0.24

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

func (*FakePlatform) SaveDNSRecords added in v0.0.24

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

func (*FakePlatform) SetGetFilesContentsFromDisk added in v0.0.24

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

func (*FakePlatform) SetIsPersistentDiskMountable added in v0.0.24

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

func (*FakePlatform) SetTimeWithNtpServers added in v0.0.24

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

func (*FakePlatform) SetUserPassword added in v0.0.24

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

func (*FakePlatform) SetupBlobsDir added in v0.0.24

func (p *FakePlatform) SetupBlobsDir() error

func (*FakePlatform) SetupDataDir added in v0.0.24

func (p *FakePlatform) SetupDataDir() error

func (*FakePlatform) SetupEphemeralDiskWithPath added in v0.0.24

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

func (*FakePlatform) SetupHomeDir added in v0.0.24

func (p *FakePlatform) SetupHomeDir() error

func (*FakePlatform) SetupHostname added in v0.0.24

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

func (p *FakePlatform) SetupLogDir() error

func (*FakePlatform) SetupLoggingAndAuditing added in v0.0.24

func (p *FakePlatform) SetupLoggingAndAuditing() error

func (*FakePlatform) SetupLogrotate added in v0.0.24

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

func (*FakePlatform) SetupMonitUser added in v0.0.24

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

func (*FakePlatform) SetupNetworking added in v0.0.24

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

func (*FakePlatform) SetupRawEphemeralDisks added in v0.0.24

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

func (*FakePlatform) SetupRecordsJSONPermission added in v0.0.24

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

func (*FakePlatform) SetupRootDisk added in v0.0.24

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

func (*FakePlatform) SetupRuntimeConfiguration added in v0.0.24

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

func (*FakePlatform) SetupSSH added in v0.0.24

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

func (*FakePlatform) SetupTmpDir added in v0.0.24

func (p *FakePlatform) SetupTmpDir() error

func (*FakePlatform) StartMonit added in v0.0.24

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

func (*FakePlatform) UnmountPersistentDisk added in v0.0.24

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