|
17 | 17 | end |
18 | 18 |
|
19 | 19 | after do |
20 | | - WebMock.reset! |
| 20 | + WebMock.reset! |
21 | 21 | end |
22 | 22 |
|
23 | 23 | context 'should not be performed' do |
|
80 | 80 | end |
81 | 81 | end |
82 | 82 |
|
83 | | - |
84 | | - context 'last operation' do |
| 83 | + context 'last operation response' do |
85 | 84 | context 'response for last operation is 200 state failed' do |
86 | 85 | let(:broker_bind_status_code) { 202 } |
87 | 86 | before do |
|
163 | 162 |
|
164 | 163 | context 'should be performed' do |
165 | 164 | context 'broker returns 200 with bad data' do |
166 | | - let(:broker_bind_status_code) { 200 } |
167 | | - let(:bind_response_body) { '{ "route_service_url": "bad-url"}' } |
| 165 | + let(:broker_bind_status_code) { 200 } |
| 166 | + let(:bind_response_body) { '{ "route_service_url": "bad-url"}' } |
168 | 167 |
|
169 | | - it 'fails the job and performs OM' do |
170 | | - execute_all_jobs(expected_successes: 1, expected_failures: 1) |
| 168 | + it 'fails the job and performs OM' do |
| 169 | + execute_all_jobs(expected_successes: 1, expected_failures: 1) |
171 | 170 |
|
172 | | - assert_failed_job(binding, job) |
173 | | - assert_orphan_mitigation_performed(plan_id, offering_id) |
174 | | - end |
| 171 | + assert_failed_job(binding, job) |
| 172 | + assert_orphan_mitigation_performed(plan_id, offering_id) |
| 173 | + end |
175 | 174 | end |
176 | 175 |
|
177 | 176 | context 'broker returns a 2xx code' do |
|
203 | 202 | end |
204 | 203 |
|
205 | 204 | context 'broker returns a 410 code' do |
206 | | - let(:broker_bind_status_code) { 410 } |
| 205 | + let(:broker_bind_status_code) { 410 } |
207 | 206 |
|
208 | | - it 'does orphan mitigation and fails the job' do |
209 | | - execute_all_jobs(expected_successes: 1, expected_failures: 1) |
| 207 | + it 'does orphan mitigation and fails the job' do |
| 208 | + execute_all_jobs(expected_successes: 1, expected_failures: 1) |
210 | 209 |
|
211 | | - assert_failed_job(binding, job) |
212 | | - assert_orphan_mitigation_performed(plan_id, offering_id) |
213 | | - end |
| 210 | + assert_failed_job(binding, job) |
| 211 | + assert_orphan_mitigation_performed(plan_id, offering_id) |
| 212 | + end |
214 | 213 | end |
215 | 214 |
|
216 | 215 | context 'broker response is 422 with unknown reason' do |
|
0 commit comments