testutils

package
v0.0.0-...-8488f5b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2016 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRelease

func NewRelease(id string, artifact *ct.Artifact, processes map[string]int) *ct.Release

func NewReleaseOmni

func NewReleaseOmni(id string, artifact *ct.Artifact, processes map[string]int, omni bool) *ct.Release

Types

type ClusterStream

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

func (*ClusterStream) Close

func (c *ClusterStream) Close() error

func (*ClusterStream) Err

func (c *ClusterStream) Err() error

type FakeCluster

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

func NewFakeCluster

func NewFakeCluster() *FakeCluster

func (*FakeCluster) AddHost

func (c *FakeCluster) AddHost(h *FakeHostClient)

func (*FakeCluster) Host

func (c *FakeCluster) Host(id string) (utils.HostClient, error)

func (*FakeCluster) Hosts

func (c *FakeCluster) Hosts() ([]utils.HostClient, error)

func (*FakeCluster) RemoveHost

func (c *FakeCluster) RemoveHost(hostID string)

func (*FakeCluster) SetHosts

func (c *FakeCluster) SetHosts(h map[string]*FakeHostClient)

func (*FakeCluster) StreamHostEvents

func (c *FakeCluster) StreamHostEvents(ch chan *discoverd.Event) (stream.Stream, error)

type FakeControllerClient

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

func NewFakeControllerClient

func NewFakeControllerClient() *FakeControllerClient

func (*FakeControllerClient) AppList

func (c *FakeControllerClient) AppList() ([]*ct.App, error)

func (*FakeControllerClient) CreateApp

func (c *FakeControllerClient) CreateApp(app *ct.App) error

func (*FakeControllerClient) CreateArtifact

func (c *FakeControllerClient) CreateArtifact(artifact *ct.Artifact) error

func (*FakeControllerClient) CreateRelease

func (c *FakeControllerClient) CreateRelease(release *ct.Release) error

func (*FakeControllerClient) FormationListActive

func (c *FakeControllerClient) FormationListActive() ([]*ct.ExpandedFormation, error)

func (*FakeControllerClient) GetApp

func (c *FakeControllerClient) GetApp(appID string) (*ct.App, error)

func (*FakeControllerClient) GetArtifact

func (c *FakeControllerClient) GetArtifact(artifactID string) (*ct.Artifact, error)

func (*FakeControllerClient) GetExpandedFormation

func (c *FakeControllerClient) GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error)

func (*FakeControllerClient) GetFormation

func (c *FakeControllerClient) GetFormation(appID, releaseID string) (*ct.Formation, error)

func (*FakeControllerClient) GetRelease

func (c *FakeControllerClient) GetRelease(releaseID string) (*ct.Release, error)

func (*FakeControllerClient) JobListActive

func (c *FakeControllerClient) JobListActive() ([]*ct.Job, error)

func (*FakeControllerClient) PutFormation

func (c *FakeControllerClient) PutFormation(formation *ct.Formation) error

func (*FakeControllerClient) PutJob

func (c *FakeControllerClient) PutJob(job *ct.Job) error

func (*FakeControllerClient) StreamFormations

func (c *FakeControllerClient) StreamFormations(since *time.Time, ch chan<- *ct.ExpandedFormation) (stream.Stream, error)

type FakeHostClient

type FakeHostClient struct {
	Jobs map[string]host.ActiveJob

	Healthy       bool
	TestEventHook chan struct{}
	// contains filtered or unexported fields
}

func NewFakeHostClient

func NewFakeHostClient(hostID string, sync bool) *FakeHostClient

func (*FakeHostClient) AddJob

func (c *FakeHostClient) AddJob(job *host.Job) error

func (*FakeHostClient) Attach

func (c *FakeHostClient) Attach(req *host.AttachReq, wait bool) (cluster.AttachClient, error)

func (*FakeHostClient) CrashJob

func (c *FakeHostClient) CrashJob(uuid string) error

func (*FakeHostClient) CreateVolume

func (c *FakeHostClient) CreateVolume(providerID string) (*volume.Info, error)

func (*FakeHostClient) GetJob

func (c *FakeHostClient) GetJob(id string) (*host.ActiveJob, error)

func (*FakeHostClient) GetStatus

func (c *FakeHostClient) GetStatus() (*host.HostStatus, error)

func (*FakeHostClient) ID

func (c *FakeHostClient) ID() string

func (*FakeHostClient) IsStopped

func (c *FakeHostClient) IsStopped(id string) bool

func (*FakeHostClient) ListJobs

func (c *FakeHostClient) ListJobs() (map[string]host.ActiveJob, error)

func (*FakeHostClient) SetAttach

func (c *FakeHostClient) SetAttach(id string, ac cluster.AttachClient)

func (*FakeHostClient) SetAttachFunc

func (c *FakeHostClient) SetAttachFunc(id string, f attachFunc)

func (*FakeHostClient) StopJob

func (c *FakeHostClient) StopJob(id string) error

func (*FakeHostClient) StreamEvents

func (c *FakeHostClient) StreamEvents(id string, ch chan *host.Event) (stream.Stream, error)

func (*FakeHostClient) Tags

func (c *FakeHostClient) Tags() map[string]string

type FormationStream

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

func (*FormationStream) Close

func (fs *FormationStream) Close() error

func (*FormationStream) Err

func (fs *FormationStream) Err() error

type HostStream

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

func (*HostStream) Close

func (h *HostStream) Close() error

func (*HostStream) Err

func (h *HostStream) Err() error

Jump to

Keyboard shortcuts

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