Skip to content

Commit

Permalink
Update tests to check sensors from ECS agent API
Browse files Browse the repository at this point in the history
  • Loading branch information
grkvlt committed Dec 7, 2016
1 parent b9bd9b9 commit 4fb6c7b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecs/catalog/ecs/ecs.bom
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ brooklyn.catalog:
jq '.ContainerInstanceArn'
- type: org.apache.brooklyn.core.sensor.ssh.SshCommandSensor
brooklyn.config:
name: ecs.task.count
name: ecs.tasks.count
description: |
ECS task count for the instance
targetType: integer
Expand Down
28 changes: 28 additions & 0 deletions ecs/tests/ecs/ecs.tests.bom
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ brooklyn.catalog:
The ECS cluster to test
brooklyn.config:
ecs.cluster.name: "clocker-qa-test"
ecs.agent.version: "1.13.0"

- type: test-case
name: "ecs-test-suite"
Expand All @@ -54,3 +55,30 @@ brooklyn.catalog:
name: "TEST-01 Assert up"
- type: assert-running
name: "TEST-02 Assert running"
- type: sensor-test
name: "TEST-03 Size of cluster is 2"
targetId: ecs-docker-cluster
timeout: 20m
sensor: group.members.count
assert:
equals: $brooklyn:config("docker.initial.size")
- type: sensor-test
name: "TEST-04 Number of tasks is 0"
targetId: ecs-docker-cluster
timeout: 20m
sensor: ecs.tasks.total
assert:
equals: 0
- type: loop-test-case
name: "TEST-05 Check agent version"
brooklyn.config:
targetId: ecs-docker-cluster
test.spec:
$brooklyn:entitySpec:
type: sensor-test
name: "TEST-05-a Agent version sensor same as config"
targetId: ecs-agent
timeout: 20m
sensor: ecs.agent.versoin
assert:
contains: $brooklyn:config("ecs.agent.version")

0 comments on commit 4fb6c7b

Please sign in to comment.