blob: cb67e713a2811a332c5246d425e5ed6d34b50c19 [file] [log] [blame]
Steve Baker60bd2e02016-07-27 22:57:31 +00001defaults:
2 request_headers:
3 X-Auth-Token: $ENVIRON['OS_TOKEN']
4
5tests:
6- name: stack list
7 GET: /stacks
8 status: 200
9 response_headers:
rabif7ea44e2017-03-30 09:56:03 +053010 content-type: application/json
Steve Baker60bd2e02016-07-27 22:57:31 +000011
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
rabi22847572017-08-17 09:41:48 +053048
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}
rabi32102c62017-10-09 10:27:39 +0530109 action_wait_secs:
110 update: 1
rabi22847572017-08-17 09:41:48 +0530111 outputs:
112 output_value:
113 value: {get_attr: [test, output]}
114
115 status: 202
116
117- name: poll for stack UPDATE_COMPLETE
118 GET: $LAST_URL
119 redirects: True
120 poll:
121 count: 5
122 delay: 1.0
123 response_json_paths:
124 $.stack.stack_status: UPDATE_COMPLETE
125
126- name: patch update stack
127 PATCH: $LAST_URL
128 request_headers:
129 content-type: application/json
130 data:
131 parameters: {'test_val': new_patched_value}
132
133 status: 202
134
135- name: poll for stack patch UPDATE_COMPLETE
136 GET: $LAST_URL
137 redirects: True
138 poll:
139 count: 5
140 delay: 1.0
141 response_json_paths:
142 $.stack.stack_status: UPDATE_COMPLETE
rabi399af3c2017-10-10 14:10:52 +0530143 $.stack.updated_time: /^(?!$HISTORY['poll for stack UPDATE_COMPLETE'].$RESPONSE['$.stack.updated_time'])/
rabi22847572017-08-17 09:41:48 +0530144
145- name: list stack outputs
146 GET: $LAST_URL/outputs
147 redirects: True
148 status: 200
149 response_json_paths:
150 $.outputs[0].output_key: output_value
151
152- name: get stack output
153 GET: $LAST_URL/output_value
154 redirects: True
155 status: 200
156 response_json_paths:
157 $.output.output_value: new_patched_value
158
159- name: delete stack
160 DELETE: /stacks/$ENVIRON['PREFIX']-stack
161 redirects: True
162 status: 204