Branch Coverage

blib/lib/STF/Dispatcher/Test.pm
Criterion Covered Total %
branch 29 58 50.0


line true false branch
34 0 2 unless (ok !$res->is_success, 'bucket creation request with object_name should fail')
41 2 0 if (ok !$res->is_success, 'bucket fetch with non-existing bucket should fail') { }
50 0 2 unless (ok $res->is_success, 'bucket creation request was successful')
58 0 2 unless (ok $res->is_success, 'bucket creation request (again) was successful')
61 0 2 unless (is $res->code, 204, 'status should be 204')
74 0 2 unless (ok !$res->is_success, 'object creation request should fail')
85 0 2 unless (ok !$res->is_success, 'object creation request should fail')
96 0 2 unless (ok $res->is_success, 'object creation request was successful')
104 0 2 unless (ok !$res->is_success, 'object fetch request should fail')
114 2 0 if (my $last_mod = $res->header('Last-Modified'))
120 0 2 unless (is $res->code, 200, 'code is 200')
129 0 2 unless (is $res->code, 304, 'code is 304!')
159 0 2 unless (ok !$res->is_success, 'object deletion request should fail')
167 0 2 unless (ok !$res->is_success, 'object deletion request should fail')
175 0 2 unless (ok $res->is_success, 'object deletion request was successful')
183 0 2 unless (is $res->code, 404, 'get after delete is 404')
195 0 2 unless (ok $res->is_success, 'object creation request was successful')
205 0 2 unless (is $res->code, 201, 'move should result in 201')
212 0 2 unless (is $res->code, 404, 'get after move is 404')
219 0 2 unless (is $res->code, 200, 'get new url after move is 200')
227 0 2 unless (is $res->code, 500, 'move to non-existent bucket should fail')
232 0 2 unless (is $res->code, 201, 'create new bucket should be 201')
237 0 2 unless (is $res->code, 201, 'move to another bucket should be 201')
246 0 2 unless (is $res->code, 500, 'renaming bucket to an existing one should fail')
253 0 2 unless (is $res->code, 201, 'renaming bucket to a new name should be 201')
259 0 2 unless (is $res->code, 200, 'GET on the renamed bucket + object should be 200')
272 0 2 unless (ok $res->is_success, 'object creation request was successful')
280 0 2 unless (is $res->code, 404, 'bucket deletion request was 404')
288 0 2 if (not is($res->code, 204, 'bucket deletion request was 204'))