util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2015 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cluster string
View Source
var ECS *ecs.ECS

Functions

func GetTaskDefinition

func GetTaskDefinition(name string) (string, error)

GetTaskDefinition is a helper that provies the family:revision for the named task definition where the name matches the folder in which the task definition is present. In order to avoid re-registering a task definition when it has already been regestered in the past, this registers a task definition of the pattern 'family-md5sum' with md5sum being the input task definition json's md5. This special family name is checked for existence before a new one is registered and it is assumed that if it exists, the task definition currently represented by the file was registered as such already.

Types

type TestAgent

type TestAgent struct {
	Image                string
	DockerID             string
	IntrospectionURL     string
	Version              string
	ContainerInstanceArn string
	Cluster              string
	TestDir              string

	DockerClient *docker.Client
	// contains filtered or unexported fields
}

func RunAgent

func RunAgent(t *testing.T, version *string) *TestAgent

RunAgent launches the agent and returns an object which may be used to reference it. It will wait until the agent is correctly registered before returning. 'version' may be a docker image (e.g. amazon/amazon-ecs-agent:v1.0.0) with tag that may be used to run the agent. It defaults to 'amazon/amazon-ecs-agent:make', the version created locally by running 'make'

func (*TestAgent) Cleanup

func (agent *TestAgent) Cleanup()

func (*TestAgent) ResolveTaskDockerID

func (agent *TestAgent) ResolveTaskDockerID(task *TestTask, containerName string) (string, error)

func (*TestAgent) StartAgent

func (agent *TestAgent) StartAgent() error

func (*TestAgent) StartMultipleTasks

func (agent *TestAgent) StartMultipleTasks(t *testing.T, task string, num int) ([]*TestTask, error)

func (*TestAgent) StartTask

func (agent *TestAgent) StartTask(t *testing.T, task string) (*TestTask, error)

func (*TestAgent) StartTaskWithOverrides

func (agent *TestAgent) StartTaskWithOverrides(t *testing.T, task string, overrides []*ecs.ContainerOverride) (*TestTask, error)

func (*TestAgent) StopAgent

func (agent *TestAgent) StopAgent() error

type TestTask

type TestTask struct {
	*ecs.Task
}

func (*TestTask) ContainerExitcode

func (task *TestTask) ContainerExitcode(name string) (int, bool)

func (*TestTask) ExpectErrorType

func (task *TestTask) ExpectErrorType(containerName, errType string, timeout time.Duration) error

func (*TestTask) Redescribe

func (task *TestTask) Redescribe()

func (*TestTask) Stop

func (task *TestTask) Stop() error

func (*TestTask) WaitRunning

func (task *TestTask) WaitRunning(timeout time.Duration) error

func (*TestTask) WaitStopped

func (task *TestTask) WaitStopped(timeout time.Duration) error

Jump to

Keyboard shortcuts

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