blob: 52c3cde064e59c66dd0026571db6156d535b6f65 [file] [log] [blame]
Mehdi Abaakouk80081512015-07-29 19:03:26 +02001defaults:
2 request_headers:
3 x-auth-token: $ENVIRON['ADMIN_TOKEN']
4
5tests:
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 Abaakouk7f089ac2015-08-05 08:49:45 +020026 data: <@create_stack.json
Mehdi Abaakouk80081512015-07-29 19:03:26 +020027 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 Abaakouk383becb2015-08-21 08:16:29 +000047 poll:
48 count: 5
49 delay: 1
Mehdi Abaakouk80081512015-07-29 19:03:26 +020050 response_json_paths:
51 $.stack.stack_status: "CREATE_COMPLETE"
52
53 - name: list servers
Mehdi Abaakouk6f1e34e2015-08-28 10:10:51 +020054 desc: Wait the autoscaling stack grow to two servers
Mehdi Abaakouk80081512015-07-29 19:03:26 +020055 url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail
56 method: GET
57 poll:
Mehdi Abaakouk383becb2015-08-21 08:16:29 +000058 count: 600
Mehdi Abaakouk80081512015-07-29 19:03:26 +020059 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 Abaakouk80081512015-07-29 19:03:26 +020063 $.servers[0].status: ACTIVE
64 $.servers[1].status: ACTIVE
Mehdi Abaakouk7f089ac2015-08-05 08:49:45 +020065 $.servers.`len`: 2
Mehdi Abaakouk80081512015-07-29 19:03:26 +020066
67 - name: check gnocchi resources
Mehdi Abaakouk6f1e34e2015-08-28 10:10:51 +020068 desc: Check the gnocchi resources for this two servers exists
Mehdi Abaakouk80081512015-07-29 19:03:26 +020069 url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource/instance
70 method: GET
Mehdi Abaakouk383becb2015-08-21 08:16:29 +000071 poll:
72 count: 30
73 delay: 1
Mehdi Abaakouk80081512015-07-29 19:03:26 +020074 response_strings:
75 - '"id": "$RESPONSE["$.servers[0].id"]"'
76 - '"id": "$RESPONSE["$.servers[1].id"]"'
Mehdi Abaakouk80081512015-07-29 19:03:26 +020077
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 Abaakouk7f089ac2015-08-05 08:49:45 +020082 poll:
83 count: 30
84 delay: 1
Mehdi Abaakouk80081512015-07-29 19:03:26 +020085 response_strings:
86 - "integration_test-cpu_alarm_high-"
87 response_json_paths:
88 $[0].state: alarm
89
Mehdi Abaakouk7f089ac2015-08-05 08:49:45 +020090 - 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 Abaakouk6f1e34e2015-08-28 10:10:51 +0200130 desc: Wait the autoscaling stack shrink to one server
Mehdi Abaakouk7f089ac2015-08-05 08:49:45 +0200131 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 Abaakouk80081512015-07-29 19:03:26 +0200141 - 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 Abaakouke3a1aca2016-12-16 10:53:22 +0100159 count: 300
Mehdi Abaakouk80081512015-07-29 19:03:26 +0200160 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 - "[]"