rabi | 71d2dcc | 2016-11-25 17:23:45 +0530 | [diff] [blame] | 1 | defaults: |
| 2 | request_headers: |
| 3 | X-Auth-Token: $ENVIRON['OS_TOKEN'] |
| 4 | |
| 5 | tests: |
| 6 | - name: environment with parameter |
| 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']-envstack |
| 15 | environment: |
| 16 | parameters: |
| 17 | test_val: test |
| 18 | template: |
| 19 | heat_template_version: '2016-04-08' |
| 20 | parameters: |
| 21 | test_val: |
| 22 | type: string |
| 23 | resources: |
| 24 | test: |
| 25 | type: OS::Heat::TestResource |
| 26 | properties: |
| 27 | value: {get_param: test_val} |
| 28 | outputs: |
| 29 | output_value: |
| 30 | value: {get_attr: [test, output]} |
| 31 | |
| 32 | status: 201 |
| 33 | response_headers: |
| 34 | location: //stacks/$ENVIRON['PREFIX']-envstack/[a-f0-9-]+/ |
| 35 | |
| 36 | - name: poll for envstack CREATE_COMPLETE |
| 37 | GET: $LOCATION |
| 38 | redirects: True |
| 39 | poll: |
| 40 | count: 5 |
| 41 | delay: 1.0 |
| 42 | response_json_paths: |
| 43 | $.stack.stack_status: CREATE_COMPLETE |
| 44 | |
| 45 | - name: get stack output |
| 46 | GET: $LAST_URL/outputs/output_value |
| 47 | redirects: True |
| 48 | status: 200 |
| 49 | response_json_paths: |
| 50 | $.output.output_value: test |
| 51 | |
| 52 | - name: delete envstack |
| 53 | DELETE: /stacks/$ENVIRON['PREFIX']-envstack |
| 54 | redirects: True |
| 55 | status: 204 |