Improve placement API 404 and 405 response tests

More detailed tests of 404 and 405 responses to ensure they
include expected information. The 404 tests revealed a missing
json_formatter for a 404.

This was shortcoming revealed by further work on the already merged
placement API tests.

Change-Id: I8150615705bbd2e350d0639f3c2cdb1b14c52518
Partially-Implements: blueprint generic-resource-pools
This commit is contained in:
Chris Dent 2016-06-19 14:40:03 +00:00
parent 29ae67ab55
commit d3bc56fae4
1 changed files with 16 additions and 0 deletions

View File

@ -45,6 +45,12 @@ tests:
- name: 405 on bad method on app
DELETE: /resource_providers
status: 405
response_headers:
allow: /(GET|POST), (POST|GET)/
response_json_paths:
$.errors[0].title: Method Not Allowed
response_strings:
- The method DELETE is not allowed for this resource.
- name: bad accept resource providers
GET: /resource_providers
@ -114,3 +120,13 @@ tests:
content-type: text/plain
data: Why U no provide?
status: 415
- name: non inventory sub resource provider path
GET: /resource_providers/7850178f-1807-4512-b135-0b174985405b/cows
request_headers:
accept: application/json
status: 404
response_json_paths:
$.errors[0].title: Not Found
response_strings:
- The resource could not be found.