Steve Baker | 60bd2e0 | 2016-07-27 22:57:31 +0000 | [diff] [blame] | 1 | defaults: |
| 2 | request_headers: |
| 3 | X-Auth-Token: $ENVIRON['OS_TOKEN'] |
| 4 | |
| 5 | tests: |
| 6 | - name: stack list |
| 7 | GET: /stacks |
| 8 | status: 200 |
| 9 | response_headers: |
rabi | f7ea44e | 2017-03-30 09:56:03 +0530 | [diff] [blame] | 10 | content-type: application/json |
Steve Baker | 60bd2e0 | 2016-07-27 22:57:31 +0000 | [diff] [blame] | 11 | |
| 12 | - name: create empty stack |
| 13 | POST: /stacks |
| 14 | request_headers: |
| 15 | content-type: application/json |
| 16 | data: |
| 17 | files: {} |
| 18 | disable_rollback: true |
| 19 | parameters: {} |
| 20 | stack_name: $ENVIRON['PREFIX']-empty |
| 21 | environment: {} |
| 22 | template: |
| 23 | heat_template_version: '2016-04-08' |
| 24 | |
| 25 | status: 201 |
| 26 | response_headers: |
| 27 | location: //stacks/$ENVIRON['PREFIX']-empty/[a-f0-9-]+/ |
| 28 | |
| 29 | |
| 30 | - name: poll for empty CREATE_COMPLETE |
| 31 | GET: $LOCATION |
| 32 | redirects: True |
| 33 | poll: |
| 34 | count: 5 |
| 35 | delay: 1.0 |
| 36 | response_json_paths: |
| 37 | $.stack.stack_status: CREATE_COMPLETE |
| 38 | |
| 39 | - name: show empty stack |
| 40 | GET: $LAST_URL |
| 41 | redirects: True |
| 42 | status: 200 |
| 43 | |
| 44 | - name: delete empty stack |
| 45 | DELETE: $LAST_URL |
| 46 | redirects: True |
| 47 | status: 204 |
rabi | 2284757 | 2017-08-17 09:41:48 +0530 | [diff] [blame] | 48 | |
| 49 | - name: create stack |
| 50 | POST: /stacks |
| 51 | request_headers: |
| 52 | content-type: application/json |
| 53 | data: |
| 54 | files: {} |
| 55 | disable_rollback: true |
| 56 | parameters: {'test_val': value} |
| 57 | stack_name: $ENVIRON['PREFIX']-stack |
| 58 | template: |
| 59 | heat_template_version: pike |
| 60 | parameters: |
| 61 | test_val: |
| 62 | type: string |
| 63 | resources: |
| 64 | test: |
| 65 | type: OS::Heat::TestResource |
| 66 | properties: |
| 67 | value: {get_param: test_val} |
| 68 | outputs: |
| 69 | output_value: |
| 70 | value: {get_attr: [test, output]} |
| 71 | |
| 72 | status: 201 |
| 73 | response_headers: |
| 74 | location: //stacks/$ENVIRON['PREFIX']-stack/[a-f0-9-]+/ |
| 75 | |
| 76 | - name: poll for stack CREATE_COMPLETE |
| 77 | GET: $LOCATION |
| 78 | redirects: True |
| 79 | poll: |
| 80 | count: 5 |
| 81 | delay: 1.0 |
| 82 | response_json_paths: |
| 83 | $.stack.stack_status: CREATE_COMPLETE |
| 84 | |
| 85 | - name: show stack |
| 86 | GET: $LAST_URL |
| 87 | redirects: True |
| 88 | status: 200 |
| 89 | |
| 90 | - name: update stack |
| 91 | PUT: $LAST_URL |
| 92 | request_headers: |
| 93 | content-type: application/json |
| 94 | data: |
| 95 | files: {} |
| 96 | disable_rollback: true |
| 97 | parameters: {'test_val': new_value} |
| 98 | stack_name: $ENVIRON['PREFIX']-stack |
| 99 | template: |
| 100 | heat_template_version: pike |
| 101 | parameters: |
| 102 | test_val: |
| 103 | type: string |
| 104 | resources: |
| 105 | test: |
| 106 | type: OS::Heat::TestResource |
| 107 | properties: |
| 108 | value: {get_param: test_val} |
| 109 | outputs: |
| 110 | output_value: |
| 111 | value: {get_attr: [test, output]} |
| 112 | |
| 113 | status: 202 |
| 114 | |
| 115 | - name: poll for stack UPDATE_COMPLETE |
| 116 | GET: $LAST_URL |
| 117 | redirects: True |
| 118 | poll: |
| 119 | count: 5 |
| 120 | delay: 1.0 |
| 121 | response_json_paths: |
| 122 | $.stack.stack_status: UPDATE_COMPLETE |
| 123 | |
| 124 | - name: patch update stack |
| 125 | PATCH: $LAST_URL |
| 126 | request_headers: |
| 127 | content-type: application/json |
| 128 | data: |
| 129 | parameters: {'test_val': new_patched_value} |
| 130 | |
| 131 | status: 202 |
| 132 | |
| 133 | - name: poll for stack patch UPDATE_COMPLETE |
| 134 | GET: $LAST_URL |
| 135 | redirects: True |
| 136 | poll: |
| 137 | count: 5 |
| 138 | delay: 1.0 |
| 139 | response_json_paths: |
| 140 | $.stack.stack_status: UPDATE_COMPLETE |
| 141 | |
| 142 | - name: list stack outputs |
| 143 | GET: $LAST_URL/outputs |
| 144 | redirects: True |
| 145 | status: 200 |
| 146 | response_json_paths: |
| 147 | $.outputs[0].output_key: output_value |
| 148 | |
| 149 | - name: get stack output |
| 150 | GET: $LAST_URL/output_value |
| 151 | redirects: True |
| 152 | status: 200 |
| 153 | response_json_paths: |
| 154 | $.output.output_value: new_patched_value |
| 155 | |
| 156 | - name: delete stack |
| 157 | DELETE: /stacks/$ENVIRON['PREFIX']-stack |
| 158 | redirects: True |
| 159 | status: 204 |