Skip to content

Instantly share code, notes, and snippets.

@cdent
Created May 27, 2016 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdent/365f3394747457fe30a57b003d1d4806 to your computer and use it in GitHub Desktop.
Save cdent/365f3394747457fe30a57b003d1d4806 to your computer and use it in GitHub Desktop.
gabbi yaml file used for rather sloppily exploring the os-cells api in nova
defaults:
request_headers:
x-auth-token: $ENVIRON['SERVICE_TOKEN']
tests:
- name: check get
GET: /os-cells
response_json_paths:
$.cells[0].name: child
- name: check get has no details
xfail: true
GET: /os-cells
response_json_paths:
$.cells[0].capabilities.os.`sorted`: [linux, windows]
- name: check auth
GET: /os-cells
request_headers:
x-auth-token: bbf6240f7f66495fb453a33a4fe647f0
- name: tenant id mismatch
GET: /9e525927-3135-4262-b8be-d1de16dcd000/os-cells
status: 400
- name: check post, bad body
verbose: true
POST: /os-cells
status: 400
- name: check delete
desc: returns 404 instead of 405
xfail: true
DELETE: /os-cells
status: 405
- name: check name
desc: returns 404 instead of 405
xfail: true
PATCH: /os-cells
status: 405
- name: check put
desc: returns 404 instead of 405
xfail: true
PUT: /os-cells
status: 405
- name: check head
desc: returns 404 instead of 405
xfail: true
HEAD: /os-cells
status: 405
- name: check made up
desc: returns 404 instead of 405
xfail: true
MADE: /os-cells
status: 405
- name: get details
GET: /os-cells/detail
response_json_paths:
$.cells[0].capabilities.os.`sorted`: [linux, windows]
# times out
# - name: get one cell
# GET: /os-cells/child
- name: get missing cell
GET: /os-cells/4b77cd8a-905a-474f-976c-a366af5b1ba4
status: 404
- name: delete missing cell
DELETE: /os-cells/4b77cd8a-905a-474f-976c-a366af5b1ba4
status: 404
- name: post a new cell
POST: /os-cells
request_headers:
content-type: application/json
data:
cell:
name: other
type: child
# according to code 200 is expeced for compatibility
status: 200
response_json_paths:
$:
cell:
name: other
type: child
# - name: get that new cell
# GET: /os-cells/other
- name: get info of current cell
GET: /os-cells/info
response_json_paths:
$.cell.type: self
- name: delete info
desc: returns 404 and complains about not finding info cell
xfail: true
DELETE: /os-cells/info
status: 405
- name: get one cell capacities
GET: /os-cells/child/capacities
response_json_paths:
$.cell.capacities.ram_free.units_by_mb: {}
- name: get overall cell capacities
GET: /os-cells/capacities
response_json_paths:
$.cell.capacities.ram_free.units_by_mb: {}
- name: update a cell
PUT: /os-cells/other
data:
cell:
name: other
type: child
username: cow
status: 204
- name: delete that new cell
DELETE: /os-cells/other
@cdent
Copy link
Author

cdent commented May 27, 2016

Used this with gabbi-tempest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment