Fix some gabbi tests
Last gabbi version checks that data have the right content-type. In theses tests we say that data in plain/text and we put json that's not correct, old version was silencly ignored and now this is correctly checked. Same when we put data but no content-type. Since our tests are wrong, this change fixes them. Change-Id: I9a60db296467b08ef32f956471ef5e4f81f462af
This commit is contained in:
parent
e26bf9078f
commit
35c4a08dd4
|
@ -441,8 +441,7 @@ tests:
|
|||
method: POST
|
||||
request_headers:
|
||||
content-type: plain/text
|
||||
data:
|
||||
archive_policy_name: cookies
|
||||
data: '{"archive_policy_name": "cookies"}'
|
||||
status: 415
|
||||
|
||||
|
||||
|
|
|
@ -485,6 +485,7 @@ tests:
|
|||
- name: fail to create policy non-admin
|
||||
POST: /v1/archive_policy
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
x-user-id: b45187c5-150b-4730-bcb2-b5e04e234220
|
||||
x-project-id: 16764ee0-bffe-4843-aa36-04b002cdbc7c
|
||||
data:
|
||||
|
|
|
@ -115,8 +115,7 @@ tests:
|
|||
POST: /v1/metric
|
||||
request_headers:
|
||||
content-type: plain/text
|
||||
data:
|
||||
archive_policy_name: cookies
|
||||
data: '{"archive_policy_name": "cookies"}'
|
||||
status: 415
|
||||
|
||||
- name: create valid metric
|
||||
|
|
|
@ -157,11 +157,7 @@ tests:
|
|||
x-user-id: 0fbb231484614b1a80131fc22f6afc9c
|
||||
x-project-id: f3d41b770cc14f0bb94a1d5be9c0e3ea
|
||||
content-type: text/plain
|
||||
data:
|
||||
id: f93450f2-d8a5-4d67-9985-02511241e7d1
|
||||
started_at: "2014-01-03T02:02:02.000000"
|
||||
user_id: 0fbb231484614b1a80131fc22f6afc9c
|
||||
project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
|
||||
data: '{"id": "f93450f2-d8a5-4d67-9985-02511241e7d1", "started_at": "2014-01-03T02:02:02.000000", "user_id": "0fbb231484614b1a80131fc22f6afc9c", "project_id": "f3d41b770cc14f0bb94a1d5be9c0e3ea"}'
|
||||
status: 415
|
||||
|
||||
# Create a new instance resource, demonstrate that including no data
|
||||
|
@ -339,6 +335,7 @@ tests:
|
|||
request_headers:
|
||||
x-user-id: 0fbb231484614b1a80131fc22f6afc9c
|
||||
x-project-id: f3d41b770cc14f0bb94a1d5be9c0e3ea
|
||||
content-type: application/json
|
||||
data:
|
||||
host: compute2
|
||||
|
||||
|
|
Loading…
Reference in New Issue