Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 1 | defaults: |
| 2 | request_headers: |
| 3 | x-auth-token: $ENVIRON['ADMIN_TOKEN'] |
| 4 | |
| 5 | tests: |
| 6 | - name: list alarms none |
| 7 | desc: Lists alarms, none yet exist |
| 8 | url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms |
| 9 | method: GET |
| 10 | response_strings: |
| 11 | - "[]" |
| 12 | |
| 13 | - name: list servers none |
| 14 | desc: List servers, none yet exists |
| 15 | url: $ENVIRON['NOVA_SERVICE_URL']/servers |
| 16 | method: GET |
| 17 | response_strings: |
| 18 | - "[]" |
| 19 | |
| 20 | - name: create stack |
| 21 | desc: Create an autoscaling stack |
| 22 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks |
| 23 | method: POST |
| 24 | request_headers: |
| 25 | content-type: application/json |
Mehdi Abaakouk | 7f089ac | 2015-08-05 08:49:45 +0200 | [diff] [blame] | 26 | data: <@create_stack.json |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 27 | status: 201 |
| 28 | |
| 29 | - name: waiting for stack creation |
| 30 | desc: Wait for the second event on the stack resource, it can be a success or failure |
| 31 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test/events?resource_name=integration_test |
| 32 | redirects: true |
| 33 | method: GET |
| 34 | status: 200 |
| 35 | poll: |
| 36 | count: 300 |
| 37 | delay: 1 |
| 38 | response_json_paths: |
| 39 | $.events[1].resource_name: integration_test |
| 40 | |
| 41 | - name: control stack status |
| 42 | desc: Checks the stack have been created successfully |
| 43 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| 44 | redirects: true |
| 45 | method: GET |
| 46 | status: 200 |
Mehdi Abaakouk | 383becb | 2015-08-21 08:16:29 +0000 | [diff] [blame] | 47 | poll: |
| 48 | count: 5 |
| 49 | delay: 1 |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 50 | response_json_paths: |
| 51 | $.stack.stack_status: "CREATE_COMPLETE" |
| 52 | |
| 53 | - name: list servers |
Mehdi Abaakouk | 6f1e34e | 2015-08-28 10:10:51 +0200 | [diff] [blame] | 54 | desc: Wait the autoscaling stack grow to two servers |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 55 | url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail |
| 56 | method: GET |
| 57 | poll: |
Mehdi Abaakouk | 383becb | 2015-08-21 08:16:29 +0000 | [diff] [blame] | 58 | count: 600 |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 59 | delay: 1 |
| 60 | response_json_paths: |
| 61 | $.servers[0].metadata.'metering.server_group': $RESPONSE['$.stack.id'] |
| 62 | $.servers[1].metadata.'metering.server_group': $RESPONSE['$.stack.id'] |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 63 | $.servers[0].status: ACTIVE |
| 64 | $.servers[1].status: ACTIVE |
Mehdi Abaakouk | 7f089ac | 2015-08-05 08:49:45 +0200 | [diff] [blame] | 65 | $.servers.`len`: 2 |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 66 | |
| 67 | - name: check gnocchi resources |
Mehdi Abaakouk | 6f1e34e | 2015-08-28 10:10:51 +0200 | [diff] [blame] | 68 | desc: Check the gnocchi resources for this two servers exists |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 69 | url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource/instance |
| 70 | method: GET |
Mehdi Abaakouk | 383becb | 2015-08-21 08:16:29 +0000 | [diff] [blame] | 71 | poll: |
| 72 | count: 30 |
| 73 | delay: 1 |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 74 | response_strings: |
| 75 | - '"id": "$RESPONSE["$.servers[0].id"]"' |
| 76 | - '"id": "$RESPONSE["$.servers[1].id"]"' |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 77 | |
| 78 | - name: check alarm |
| 79 | desc: Check the aodh alarm and its state |
| 80 | url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms |
| 81 | method: GET |
Mehdi Abaakouk | 7f089ac | 2015-08-05 08:49:45 +0200 | [diff] [blame] | 82 | poll: |
| 83 | count: 30 |
| 84 | delay: 1 |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 85 | response_strings: |
| 86 | - "integration_test-cpu_alarm_high-" |
| 87 | response_json_paths: |
| 88 | $[0].state: alarm |
| 89 | |
Mehdi Abaakouk | 7f089ac | 2015-08-05 08:49:45 +0200 | [diff] [blame] | 90 | - name: get stack location for update |
| 91 | desc: Get the stack location |
| 92 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| 93 | method: GET |
| 94 | status: 302 |
| 95 | |
| 96 | - name: update stack |
| 97 | desc: Update an autoscaling stack |
| 98 | url: $LOCATION |
| 99 | method: PUT |
| 100 | request_headers: |
| 101 | content-type: application/json |
| 102 | data: <@update_stack.json |
| 103 | status: 202 |
| 104 | |
| 105 | - name: waiting for stack update |
| 106 | desc: Wait for the third event on the stack resource, it can be a success or failure |
| 107 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test/events?resource_name=integration_test |
| 108 | redirects: true |
| 109 | method: GET |
| 110 | status: 200 |
| 111 | poll: |
| 112 | count: 300 |
| 113 | delay: 1 |
| 114 | response_json_paths: |
| 115 | $.events[3].resource_name: integration_test |
| 116 | |
| 117 | - name: control stack status |
| 118 | desc: Checks the stack have been created successfully |
| 119 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| 120 | redirects: true |
| 121 | method: GET |
| 122 | status: 200 |
| 123 | poll: |
| 124 | count: 5 |
| 125 | delay: 1 |
| 126 | response_json_paths: |
| 127 | $.stack.stack_status: "UPDATE_COMPLETE" |
| 128 | |
| 129 | - name: list servers |
Mehdi Abaakouk | 6f1e34e | 2015-08-28 10:10:51 +0200 | [diff] [blame] | 130 | desc: Wait the autoscaling stack shrink to one server |
Mehdi Abaakouk | 7f089ac | 2015-08-05 08:49:45 +0200 | [diff] [blame] | 131 | url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail |
| 132 | method: GET |
| 133 | poll: |
| 134 | count: 600 |
| 135 | delay: 1 |
| 136 | response_json_paths: |
| 137 | $.servers[0].metadata.'metering.server_group': $RESPONSE['$.stack.id'] |
| 138 | $.servers[0].status: ACTIVE |
| 139 | $.servers.`len`: 1 |
| 140 | |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 141 | - name: get stack location |
| 142 | desc: Get the stack location |
| 143 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| 144 | method: GET |
| 145 | status: 302 |
| 146 | |
| 147 | - name: delete stack |
| 148 | desc: Delete the stack |
| 149 | url: $LOCATION |
| 150 | method: DELETE |
| 151 | status: 204 |
| 152 | |
| 153 | - name: get deleted stack |
| 154 | desc: Check the stack have been deleted |
| 155 | url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test |
| 156 | redirects: true |
| 157 | method: GET |
| 158 | poll: |
Mehdi Abaakouk | e3a1aca | 2016-12-16 10:53:22 +0100 | [diff] [blame] | 159 | count: 300 |
Mehdi Abaakouk | 8008151 | 2015-07-29 19:03:26 +0200 | [diff] [blame] | 160 | delay: 1 |
| 161 | status: 404 |
| 162 | |
| 163 | - name: list alarms deleted |
| 164 | desc: List alarms, no more exist |
| 165 | url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms |
| 166 | method: GET |
| 167 | response_strings: |
| 168 | - "[]" |
| 169 | |
| 170 | - name: list servers deleted |
| 171 | desc: List servers, no more exists |
| 172 | url: $ENVIRON['NOVA_SERVICE_URL']/servers |
| 173 | method: GET |
| 174 | response_strings: |
| 175 | - "[]" |