python-cratonclient/cratonclient/tests/cassettes/TestClouds-test_create.yaml
Ian Cordasco 2e34424cda Add integration tests for clouds client
This adds more integration tests for the v1 client, specifically for
/v1/clouds.

Further, this introduces a new test method for the integration tests as
it was found to be reimplemented in a few different test modules. This
replaces the pattern used in the existing tests with the new pattern.

Implements: bp testing-plan
Change-Id: Ic4e342cf01be288b7a7c453659580c57169b1022
2017-03-21 10:50:36 -05:00

69 lines
2.2 KiB
YAML

http_interactions:
- recorded_at: '2017-03-21T15:37:24'
request:
body:
encoding: utf-8
string: "{\n \"variables\": {\n \"cloud-var\": \"var-value\"\n },\n \"\
note\": \"This is a test cloud.\",\n \"name\": \"cloud-creation\"\n}"
headers:
Accept: '*/*'
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: '100'
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 \"updated_at\": null,\n \"project_id\": \"<craton-demo-project>\"\
,\n \"note\": \"This is a test cloud.\",\n \"id\": 51,\n \"created_at\"\
: \"2017-03-21T00:27:49.238178\",\n \"variables\": {\n \"cloud-var\":\
\ \"var-value\"\n },\n \"name\": \"cloud-creation\"\n}"
headers:
Content-Length: '253'
Content-Type: application/json
Date: Tue, 21 Mar 2017 00:27:49 GMT
Location: <craton-url>/clouds/51
Server: WSGIServer/0.2 CPython/3.5.2
x-openstack-request-id: req-3bd28970-bd1a-465a-9598-d42db902336e
status:
code: 201
message: CREATED
url: <craton-url>/clouds
- recorded_at: '2017-03-21T15:37:24'
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/51
response:
body:
encoding: null
string: ''
headers:
Content-Length: '0'
Content-Type: application/json
Date: Tue, 21 Mar 2017 00:27:49 GMT
Server: WSGIServer/0.2 CPython/3.5.2
x-openstack-request-id: req-50ddeb39-ff4e-4070-8f13-f2664e27075f
status:
code: 204
message: NO CONTENT
url: <craton-url>/clouds/51
recorded_with: betamax/0.8.0