Documentation ¶
Index ¶
- Variables
- func GetTaskDefinition(name string) (string, error)
- type TestAgent
- func (agent *TestAgent) Cleanup()
- func (agent *TestAgent) ResolveTaskDockerID(task *TestTask, containerName string) (string, error)
- func (agent *TestAgent) StartAgent() error
- func (agent *TestAgent) StartMultipleTasks(t *testing.T, task string, num int) ([]*TestTask, error)
- func (agent *TestAgent) StartTask(t *testing.T, task string) (*TestTask, error)
- func (agent *TestAgent) StartTaskWithOverrides(t *testing.T, task string, overrides []*ecs.ContainerOverride) (*TestTask, error)
- func (agent *TestAgent) StopAgent() error
- type TestTask
- func (task *TestTask) ContainerExitcode(name string) (int, bool)
- func (task *TestTask) ExpectErrorType(containerName, errType string, timeout time.Duration) error
- func (task *TestTask) Redescribe()
- func (task *TestTask) Stop() error
- func (task *TestTask) WaitRunning(timeout time.Duration) error
- func (task *TestTask) WaitStopped(timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
var Cluster string
var ECS *ecs.ECS
Functions ¶
func GetTaskDefinition ¶
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 ¶
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) ResolveTaskDockerID ¶
func (*TestAgent) StartAgent ¶
func (*TestAgent) StartMultipleTasks ¶
func (*TestAgent) StartTaskWithOverrides ¶
type TestTask ¶
func (*TestTask) ContainerExitcode ¶
func (*TestTask) ExpectErrorType ¶
func (*TestTask) Redescribe ¶
func (task *TestTask) Redescribe()