rabi | c074216 | 2016-11-29 12:28:38 +0530 | [diff] [blame] | 1 | defaults: |
| 2 | request_headers: |
| 3 | X-Auth-Token: $ENVIRON['OS_TOKEN'] |
| 4 | |
| 5 | tests: |
| 6 | - name: create stack with resources |
| 7 | POST: /stacks |
| 8 | request_headers: |
| 9 | content-type: application/json |
| 10 | data: |
| 11 | files: {} |
| 12 | disable_rollback: true |
| 13 | parameters: {} |
| 14 | stack_name: $ENVIRON['PREFIX']-rsrcstack |
| 15 | template: |
| 16 | heat_template_version: '2016-04-08' |
| 17 | parameters: |
| 18 | test_val: |
| 19 | type: string |
| 20 | default: test |
| 21 | resources: |
| 22 | test: |
| 23 | type: OS::Heat::TestResource |
| 24 | properties: |
| 25 | value: {get_param: test_val} |
| 26 | |
| 27 | status: 201 |
| 28 | response_headers: |
| 29 | location: //stacks/$ENVIRON['PREFIX']-rsrcstack/[a-f0-9-]+/ |
| 30 | |
| 31 | - name: poll for rsrcstack CREATE_COMPLETE |
| 32 | GET: $LOCATION |
| 33 | redirects: True |
| 34 | poll: |
| 35 | count: 5 |
| 36 | delay: 1.0 |
| 37 | response_json_paths: |
| 38 | $.stack.stack_status: CREATE_COMPLETE |
| 39 | |
| 40 | - name: list resources |
| 41 | GET: $LAST_URL/resources |
| 42 | request_headers: |
| 43 | content-type: application/json |
| 44 | status: 200 |
| 45 | response_json_paths: |
| 46 | $.resources[0].logical_resource_id: test |
| 47 | $.resources[0].resource_status: CREATE_COMPLETE |
| 48 | |
| 49 | - name: list filtered resources |
| 50 | GET: $LAST_URL |
| 51 | request_headers: |
| 52 | content-type: application/json |
| 53 | query_parameters: |
| 54 | type: OS::Nova::Server |
| 55 | status: 200 |
| 56 | response_json_paths: |
| 57 | $.resources: [] |
| 58 | |
| 59 | - name: show resource |
| 60 | GET: $LAST_URL/test |
| 61 | request_headers: |
| 62 | content-type: application/json |
| 63 | status: 200 |
| 64 | response_json_paths: |
| 65 | $.resource.attributes.output: test |
| 66 | |
| 67 | - name: mark resource unhealthy |
| 68 | PATCH: $LAST_URL |
| 69 | request_headers: |
| 70 | content-type: application/json |
| 71 | data: |
| 72 | mark_unhealthy: true |
| 73 | resource_status_reason: 'resource deleted' |
| 74 | status: 200 |
| 75 | |
| 76 | - name: show unhealthy resource |
| 77 | GET: $LAST_URL |
| 78 | status: 200 |
| 79 | response_json_paths: |
| 80 | $.resource.resource_status: CHECK_FAILED |
| 81 | $.resource.resource_status_reason: 'resource deleted' |
| 82 | |
| 83 | - name: signal resource |
| 84 | POST: $LAST_URL/signal |
Zane Bitter | 75aa8b1 | 2017-07-07 18:44:13 -0400 | [diff] [blame^] | 85 | status: 400 |
rabi | c074216 | 2016-11-29 12:28:38 +0530 | [diff] [blame] | 86 | |
| 87 | - name: delete stack with resources |
| 88 | DELETE: /stacks/$ENVIRON['PREFIX']-rsrcstack |
| 89 | redirects: True |
| 90 | status: 204 |