fakes

package
v0.0.0-...-9a89ba0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyInput

type ApplyInput struct {
	StemcellApplySpec bmstemcell.ApplySpec
	Deployment        bmdepl.Deployment
}

type CalculateInput

type CalculateInput struct {
	Sha1 string
	Err  error
}

type CreateInput

type CreateInput struct {
	DeploymentJob  bmdepl.Job
	StemcellJob    bmstemcell.Job
	DeploymentName string
	Properties     map[string]interface{}
	MbusURL        string
}

type FakeInstance

type FakeInstance struct {
	ApplyInputs []ApplyInput
	ApplyErr    error

	StartCalled bool
	StartErr    error

	WaitToBeReadyInputs []WaitInput
	WaitToBeReadyErr    error

	WaitToBeRunningInputs []WaitInput
	WaitToBeRunningErr    error
}

func NewFakeInstance

func NewFakeInstance() *FakeInstance

func (*FakeInstance) Apply

func (i *FakeInstance) Apply(stemcellApplySpec bmstemcell.ApplySpec, deployment bmdepl.Deployment) error

func (*FakeInstance) Start

func (i *FakeInstance) Start() error

func (*FakeInstance) WaitToBeReady

func (i *FakeInstance) WaitToBeReady(maxAttempts int, delay time.Duration) error

func (*FakeInstance) WaitToBeRunning

func (i *FakeInstance) WaitToBeRunning(maxAttempts int, delay time.Duration) error

type FakeInstanceFactory

type FakeInstanceFactory struct {
	CreateMbusURL  string
	CreateInstance bmins.Instance
}

func NewFakeInstanceFactory

func NewFakeInstanceFactory() *FakeInstanceFactory

func (*FakeInstanceFactory) Create

func (f *FakeInstanceFactory) Create(mbusURL string) bmins.Instance

type FakeSha1Calculator

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

func NewFakeSha1Calculator

func NewFakeSha1Calculator() *FakeSha1Calculator

func (*FakeSha1Calculator) Calculate

func (c *FakeSha1Calculator) Calculate(path string) (string, error)

func (*FakeSha1Calculator) SetCalculateBehavior

func (c *FakeSha1Calculator) SetCalculateBehavior(calculateInputs map[string]CalculateInput)

type FakeTemplatesSpecGenerator

type FakeTemplatesSpecGenerator struct {
	CreateInputs        []CreateInput
	CreateTemplatesSpec bmins.TemplatesSpec
	CreateErr           error
	CreateCalled        bool
}

func NewFakeTemplatesSpecGenerator

func NewFakeTemplatesSpecGenerator() *FakeTemplatesSpecGenerator

func (*FakeTemplatesSpecGenerator) Create

func (g *FakeTemplatesSpecGenerator) Create(
	deploymentJob bmdepl.Job,
	stemcellJob bmstemcell.Job,
	deploymentName string,
	properties map[string]interface{},
	mbusURL string,
) (bmins.TemplatesSpec, error)

func (*FakeTemplatesSpecGenerator) SetCreateBehavior

func (g *FakeTemplatesSpecGenerator) SetCreateBehavior(createTemplatesSpec bmins.TemplatesSpec, err error)

type WaitInput

type WaitInput struct {
	MaxAttempts int
	Delay       time.Duration
}

Jump to

Keyboard shortcuts

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