Documentation ¶
Index ¶
- Variables
- func GetTaskDefinition(name string) (string, error)
- func RequireDockerVersion(t *testing.T, selector string)
- type AgentOptions
- type TestAgent
- func (agent *TestAgent) Cleanup()
- func (agent *TestAgent) RequireVersion(version string)
- 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
- func (agent *TestAgent) WaitRunningViaIntrospection(task *TestTask) (bool, error)
- func (agent *TestAgent) WaitStoppedViaIntrospection(task *TestTask) (bool, 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
- type Version
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.
func RequireDockerVersion ¶ added in v1.7.0
Types ¶
type AgentOptions ¶ added in v1.5.0
type TestAgent ¶
type TestAgent struct { Image string DockerID string IntrospectionURL string Version string ContainerInstanceArn string Cluster string TestDir string Logdir string Options *AgentOptions DockerClient *docker.Client // contains filtered or unexported fields }
func RunAgent ¶
func RunAgent(t *testing.T, options *AgentOptions) *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) RequireVersion ¶ added in v1.5.0
func (*TestAgent) ResolveTaskDockerID ¶
ResolveTaskDockerID determines the Docker ID for a container within a given task that has been run by the Agent.
func (*TestAgent) StartAgent ¶
func (*TestAgent) StartMultipleTasks ¶
func (*TestAgent) StartTaskWithOverrides ¶
func (*TestAgent) WaitRunningViaIntrospection ¶ added in v1.8.2
type TestTask ¶
func (*TestTask) ContainerExitcode ¶
func (*TestTask) ExpectErrorType ¶
func (*TestTask) Redescribe ¶
func (task *TestTask) Redescribe()
type Version ¶ added in v1.5.0
type Version string
func (Version) Matches ¶ added in v1.5.0
Matches returns whether or not a version matches a given selector. The selector can be any of the following:
* x.y.z -- Matches a version exactly the same as the selector version * >=x.y.z -- Matches a version greater than or equal to the selector version * >x.y.z -- Matches a version greater than the selector version * <=x.y.z -- Matches a version less than or equal to the selector version * <x.y.z -- Matches a version less than the selector version * x.y.z,a.b.c -- Matches if the version matches either of the two selector versions