
Using our new Betamax testing integration, this adds tests to verify how our cells management behaves against a real Craton API. The majority of this commit lies in the cassettes. These contain the real requests and responses for each of the tests. The cassette names are generated from the tests themselves (combination of test class name and test method). Implements: bp testing-plan Change-Id: I6c029f6ad1408508c61d3363f5ee709e9b8210d2
228 lines
6.9 KiB
YAML
228 lines
6.9 KiB
YAML
http_interactions:
|
|
- recorded_at: '2017-03-21T15:20:14'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: "{\n \"name\": \"cells-cloud-TestCells-test_delete\"\n}"
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '45'
|
|
Content-Type: application/json
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: POST
|
|
uri: <craton-url>/clouds
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: "{\n \"project_id\": \"<craton-demo-project>\",\n \"name\": \"cells-cloud-TestCells-test_delete\"\
|
|
,\n \"note\": null,\n \"updated_at\": null,\n \"variables\": {},\n \"\
|
|
created_at\": \"2017-03-21T00:10:38.237204\",\n \"id\": 15\n}"
|
|
headers:
|
|
Content-Length: '221'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Location: <craton-url>/clouds/15
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-095849cf-b6ae-4c5f-a616-491a4381d9a7
|
|
status:
|
|
code: 201
|
|
message: CREATED
|
|
url: <craton-url>/clouds
|
|
- recorded_at: '2017-03-21T15:20:14'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: "{\n \"name\": \"cells-region-TestCells-test_delete\",\n \"cloud_id\"\
|
|
: 15\n}"
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '62'
|
|
Content-Type: application/json
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: POST
|
|
uri: <craton-url>/regions
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: "{\n \"project_id\": \"<craton-demo-project>\",\n \"name\": \"cells-region-TestCells-test_delete\"\
|
|
,\n \"note\": null,\n \"updated_at\": null,\n \"variables\": {},\n \"\
|
|
created_at\": \"2017-03-21T00:10:38.370396\",\n \"id\": 11,\n \"cloud_id\"\
|
|
: 15\n}"
|
|
headers:
|
|
Content-Length: '240'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Location: <craton-url>/regions/11
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-2d162165-4187-4d44-bea3-9c1760438c60
|
|
status:
|
|
code: 201
|
|
message: CREATED
|
|
url: <craton-url>/regions
|
|
- recorded_at: '2017-03-21T15:20:14'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: "{\n \"name\": \"cell-to-delete\",\n \"cloud_id\": 15,\n \"region_id\"\
|
|
: 11\n}"
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '59'
|
|
Content-Type: application/json
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: POST
|
|
uri: <craton-url>/cells
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: "{\n \"project_id\": \"<craton-demo-project>\",\n \"name\": \"cell-to-delete\"\
|
|
,\n \"note\": null,\n \"updated_at\": null,\n \"variables\": {},\n \"\
|
|
created_at\": \"2017-03-21T00:10:38.487204\",\n \"id\": 33,\n \"region_id\"\
|
|
: 11,\n \"cloud_id\": 15\n}"
|
|
headers:
|
|
Content-Length: '239'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Location: <craton-url>/cells/33
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-81fee3a8-7f8c-4424-b8d3-d790b294efd6
|
|
status:
|
|
code: 201
|
|
message: CREATED
|
|
url: <craton-url>/cells
|
|
- recorded_at: '2017-03-21T15:20:14'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: ''
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '0'
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: DELETE
|
|
uri: <craton-url>/cells/33
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: ''
|
|
headers:
|
|
Content-Length: '0'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-755ac568-87ef-4a36-ae4c-9639e8306df7
|
|
status:
|
|
code: 204
|
|
message: NO CONTENT
|
|
url: <craton-url>/cells/33
|
|
- recorded_at: '2017-03-21T15:20:14'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: ''
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: GET
|
|
uri: <craton-url>/cells/33
|
|
response:
|
|
body:
|
|
encoding: utf-8
|
|
string: '{"message": "Not Found", "status": 404}'
|
|
headers:
|
|
Content-Length: '46'
|
|
Content-Type: text/html; charset=utf-8
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-67c08f6b-a2f5-4ce9-a12e-c34119d9f521
|
|
status:
|
|
code: 404
|
|
message: NOT FOUND
|
|
url: <craton-url>/cells/33
|
|
- recorded_at: '2017-03-21T15:20:14'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: ''
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '0'
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: DELETE
|
|
uri: <craton-url>/regions/11
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: ''
|
|
headers:
|
|
Content-Length: '0'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-c97e15dc-9562-4e9e-8a73-9e63fc7e2951
|
|
status:
|
|
code: 204
|
|
message: NO CONTENT
|
|
url: <craton-url>/regions/11
|
|
- recorded_at: '2017-03-21T15:20:15'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: ''
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '0'
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: DELETE
|
|
uri: <craton-url>/clouds/15
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: ''
|
|
headers:
|
|
Content-Length: '0'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:10:38 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-0dfe349e-fe39-40c5-bfab-ccca0456f142
|
|
status:
|
|
code: 204
|
|
message: NO CONTENT
|
|
url: <craton-url>/clouds/15
|
|
recorded_with: betamax/0.8.0
|