fakes

package
v0.0.136 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtractInput

type ExtractInput struct {
	TarballPath string
}

type FakeCloudStemcell

type FakeCloudStemcell struct {
	PromoteAsCurrentCalledTimes int
	PromoteAsCurrentErr         error

	DeleteCalledTimes int
	DeleteErr         error
	// contains filtered or unexported fields
}

func NewFakeCloudStemcell

func NewFakeCloudStemcell(cid, name, version string) *FakeCloudStemcell

func (*FakeCloudStemcell) CID

func (s *FakeCloudStemcell) CID() string

func (*FakeCloudStemcell) Delete

func (s *FakeCloudStemcell) Delete() error

func (*FakeCloudStemcell) Name

func (s *FakeCloudStemcell) Name() string

func (*FakeCloudStemcell) PromoteAsCurrent

func (s *FakeCloudStemcell) PromoteAsCurrent() error

func (*FakeCloudStemcell) Version

func (s *FakeCloudStemcell) Version() string

type FakeExtractor

type FakeExtractor struct {
	ExtractInputs []ExtractInput
	// contains filtered or unexported fields
}

func NewFakeExtractor

func NewFakeExtractor() *FakeExtractor

func (*FakeExtractor) Extract

func (e *FakeExtractor) Extract(tarballPath string) (bistemcell.ExtractedStemcell, error)

func (*FakeExtractor) SetExtractBehavior

func (e *FakeExtractor) SetExtractBehavior(
	tarballPath string,
	extractedStemcell bistemcell.ExtractedStemcell,
	err error,
)

type FakeManager

type FakeManager struct {
	UploadInputs []UploadInput

	DeleteUnusedCalledTimes int
	DeleteUnusedErr         error
	// contains filtered or unexported fields
}

func NewFakeManager

func NewFakeManager() *FakeManager

func (*FakeManager) DeleteUnused

func (m *FakeManager) DeleteUnused(eventLoggerStage biui.Stage) error

func (*FakeManager) FindCurrent

func (m *FakeManager) FindCurrent() ([]bistemcell.CloudStemcell, error)

func (*FakeManager) FindUnused

func (m *FakeManager) FindUnused() ([]bistemcell.CloudStemcell, error)

func (*FakeManager) SetFindUnusedBehavior

func (m *FakeManager) SetFindUnusedBehavior(
	stemcells []bistemcell.CloudStemcell,
	err error,
)

func (*FakeManager) SetUploadBehavior

func (m *FakeManager) SetUploadBehavior(
	extractedStemcell bistemcell.ExtractedStemcell,
	stage biui.Stage,
	cloudStemcell bistemcell.CloudStemcell,
	err error,
)

func (*FakeManager) Upload

type FakeManagerFactory

type FakeManagerFactory struct {
	NewManagerInputs []NewManagerInput
	// contains filtered or unexported fields
}

func NewFakeManagerFactory

func NewFakeManagerFactory() *FakeManagerFactory

func (*FakeManagerFactory) NewManager

func (f *FakeManagerFactory) NewManager(cloud bicloud.Cloud) bistemcell.Manager

func (*FakeManagerFactory) SetNewManagerBehavior

func (f *FakeManagerFactory) SetNewManagerBehavior(cloud bicloud.Cloud, manager bistemcell.Manager)

type FakeStemcellReader

type FakeStemcellReader struct {
	ReadBehavior map[ReadInput]ReadOutput
	ReadInputs   []ReadInput
}

func NewFakeReader

func NewFakeReader() *FakeStemcellReader

func (*FakeStemcellReader) Read

func (fr *FakeStemcellReader) Read(stemcellTarballPath, destPath string) (bistemcell.ExtractedStemcell, error)

func (*FakeStemcellReader) SetReadBehavior

func (fr *FakeStemcellReader) SetReadBehavior(stemcellTarballPath, destPath string, stemcell bistemcell.ExtractedStemcell, err error)

type NewManagerInput

type NewManagerInput struct {
	Cloud bicloud.Cloud
}

type ReadInput

type ReadInput struct {
	StemcellTarballPath string
	DestPath            string
}

type ReadOutput

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

type UploadInput

type UploadInput struct {
	Stemcell bistemcell.ExtractedStemcell
	Stage    biui.Stage
}

Jump to

Keyboard shortcuts

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