| defaults: |
| request_headers: |
| x-auth-token: $ENVIRON['ADMIN_TOKEN'] |
| |
| tests: |
| - name: list alarms none |
| desc: Lists alarms, none yet exist |
| url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms |
| method: GET |
| response_strings: |
| - "[]" |
| |
| - name: list servers none |
| desc: List servers, none yet exists |
| url: $ENVIRON['NOVA_SERVICE_URL']/servers |
| method: GET |
| response_strings: |
| - "[]" |
| |
| - name: create stack |
| desc: Create an autoscaling stack |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks |
| method: POST |
| request_headers: |
| content-type: application/json |
| data: <@create_stack.json |
| status: 201 |
| |
| - name: waiting for stack creation |
| desc: Wait for the second event on the stack resource, it can be a success or failure |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test/events?resource_name=integration_test |
| redirects: true |
| method: GET |
| status: 200 |
| poll: |
| count: 300 |
| delay: 1 |
| response_json_paths: |
| $.events[1].resource_name: integration_test |
| |
| - name: control stack status |
| desc: Checks the stack have been created successfully |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| redirects: true |
| method: GET |
| status: 200 |
| poll: |
| count: 5 |
| delay: 1 |
| response_json_paths: |
| $.stack.stack_status: "CREATE_COMPLETE" |
| |
| - name: list servers |
| desc: Wait the autoscaling stack grow to two servers |
| url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail |
| method: GET |
| poll: |
| count: 600 |
| delay: 1 |
| response_json_paths: |
| $.servers[0].metadata.'metering.server_group': $RESPONSE['$.stack.id'] |
| $.servers[1].metadata.'metering.server_group': $RESPONSE['$.stack.id'] |
| $.servers[0].status: ACTIVE |
| $.servers[1].status: ACTIVE |
| $.servers.`len`: 2 |
| |
| - name: check gnocchi resources |
| desc: Check the gnocchi resources for this two servers exists |
| url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource/instance |
| method: GET |
| poll: |
| count: 30 |
| delay: 1 |
| response_strings: |
| - '"id": "$RESPONSE["$.servers[0].id"]"' |
| - '"id": "$RESPONSE["$.servers[1].id"]"' |
| |
| - name: check alarm |
| desc: Check the aodh alarm and its state |
| url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms |
| method: GET |
| poll: |
| count: 30 |
| delay: 1 |
| response_strings: |
| - "integration_test-cpu_alarm_high-" |
| response_json_paths: |
| $[0].state: alarm |
| |
| - name: get stack location for update |
| desc: Get the stack location |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| method: GET |
| status: 302 |
| |
| - name: update stack |
| desc: Update an autoscaling stack |
| url: $LOCATION |
| method: PUT |
| request_headers: |
| content-type: application/json |
| data: <@update_stack.json |
| status: 202 |
| |
| - name: waiting for stack update |
| desc: Wait for the third event on the stack resource, it can be a success or failure |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test/events?resource_name=integration_test |
| redirects: true |
| method: GET |
| status: 200 |
| poll: |
| count: 300 |
| delay: 1 |
| response_json_paths: |
| $.events[3].resource_name: integration_test |
| |
| - name: control stack status |
| desc: Checks the stack have been created successfully |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| redirects: true |
| method: GET |
| status: 200 |
| poll: |
| count: 5 |
| delay: 1 |
| response_json_paths: |
| $.stack.stack_status: "UPDATE_COMPLETE" |
| |
| - name: list servers |
| desc: Wait the autoscaling stack shrink to one server |
| url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail |
| method: GET |
| poll: |
| count: 600 |
| delay: 1 |
| response_json_paths: |
| $.servers[0].metadata.'metering.server_group': $RESPONSE['$.stack.id'] |
| $.servers[0].status: ACTIVE |
| $.servers.`len`: 1 |
| |
| - name: get stack location |
| desc: Get the stack location |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| method: GET |
| status: 302 |
| |
| - name: delete stack |
| desc: Delete the stack |
| url: $LOCATION |
| method: DELETE |
| status: 204 |
| |
| - name: get deleted stack |
| desc: Check the stack have been deleted |
| url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| redirects: true |
| method: GET |
| poll: |
| count: 240 |
| delay: 1 |
| status: 404 |
| |
| - name: list alarms deleted |
| desc: List alarms, no more exist |
| url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms |
| method: GET |
| response_strings: |
| - "[]" |
| |
| - name: list servers deleted |
| desc: List servers, no more exists |
| url: $ENVIRON['NOVA_SERVICE_URL']/servers |
| method: GET |
| response_strings: |
| - "[]" |