fixtures: - ConfigFixture tests: - name: get information on APIs desc: Root URL must return information about API versions GET: / response_headers: content-type: /^application\/json/ response_json_paths: $.versions.[0].id: "v1.0" $.versions.[0].status: "CURRENT" - name: archive policy post success POST: /v1/archive_policy request_headers: content-type: application/json x-roles: admin data: name: test1 definition: - granularity: 1 minute points: 20 status: 201 response_headers: content-type: /^application\/json/ location: $SCHEME://$NETLOC/v1/archive_policy/test1 response_json_paths: $.name: test1 $.definition.[0].granularity: 0:01:00 $.definition.[0].points: 20 $.definition.[0].timespan: 0:20:00 - name: post archive policy no auth desc: this confirms that auth handling comes before data validation POST: /v1/archive_policy request_headers: content-type: application/json data: definition: - granularity: 1 second points: 20 status: 403 - name: post metric with archive policy POST: /v1/metric request_headers: content-type: application/json x-roles: admin x-user-id: 93180da9-7c15-40d3-a050-a374551e52ee x-project-id: 99d13f22-3618-4288-82b8-6512ded77e4f data: archive_policy_name: test1 status: 201 response_headers: content-type: /application\/json/ response_json_paths: $.archive_policy_name: test1 - name: retrieve metric info GET: $LOCATION status: 200 request_headers: content_type: /application\/json/ x-roles: admin response_json_paths: $.archive_policy.name: test1 $.created_by_user_id: 93180da9-7c15-40d3-a050-a374551e52ee $.created_by_project_id: 99d13f22-3618-4288-82b8-6512ded77e4f - name: list the one metric GET: /v1/metric status: 200 response_json_paths: $[0].archive_policy.name: test1 - name: post a single measure desc: post one measure POST: /v1/metric/$RESPONSE['$[0].id']/measures request_headers: content-type: application/json x-user-id: 93180da9-7c15-40d3-a050-a374551e52ee x-project-id: 99d13f22-3618-4288-82b8-6512ded77e4f data: - timestamp: "2013-01-01 23:23:20" value: 1234.2 status: 202 - name: Get list of resource type and URL desc: Resources index page should return list of type associated with a URL GET: /v1/resource/ response_headers: content-type: /^application\/json/ status: 200 response_json_paths: $.generic: $SCHEME://$NETLOC/v1/resource/generic - name: post generic resource POST: /v1/resource/generic request_headers: content-type: application/json x-user-id: 93180da9-7c15-40d3-a050-a374551e52ee x-project-id: 99d13f22-3618-4288-82b8-6512ded77e4f data: id: 5b7ebe90-4ad2-4c83-ad2c-f6344884ab70 started_at: "2014-01-03T02:02:02.000000" user_id: 0fbb231484614b1a80131fc22f6afc9c project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea status: 201 response_headers: location: $SCHEME://$NETLOC/v1/resource/generic/5b7ebe90-4ad2-4c83-ad2c-f6344884ab70 response_json_paths: type: generic started_at: "2014-01-03T02:02:02+00:00" project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea created_by_project_id: 99d13f22-3618-4288-82b8-6512ded77e4f - name: post generic resource bad id POST: /v1/resource/generic request_headers: content-type: application/json x-user-id: 93180da9-7c15-40d3-a050-a374551e52ee x-project-id: 99d13f22-3618-4288-82b8-6512ded77e4f data: id: 1.2.3.4 started_at: "2014-01-03T02:02:02.000000" user_id: 0fbb2314-8461-4b1a-8013-1fc22f6afc9c project_id: f3d41b77-0cc1-4f0b-b94a-1d5be9c0e3ea status: 201 response_headers: location: $SCHEME://$NETLOC/v1/resource/generic/8d835270-2834-5e55-a693-fd0cf91cba3d response_json_paths: type: generic started_at: "2014-01-03T02:02:02+00:00" project_id: f3d41b77-0cc1-4f0b-b94a-1d5be9c0e3ea created_by_project_id: 99d13f22-3618-4288-82b8-6512ded77e4f id: 8d835270-2834-5e55-a693-fd0cf91cba3d original_resource_id: 1.2.3.4 - name: get status denied GET: /v1/status status: 403 - name: get status GET: /v1/status request_headers: content-type: application/json x-user-id: 93180da9-7c15-40d3-a050-a374551e52ee x-project-id: 99d13f22-3618-4288-82b8-6512ded77e4f x-roles: admin response_json_paths: $.storage.`len`: 2 - name: get status, no details GET: /v1/status?details=False request_headers: content-type: application/json x-user-id: 93180da9-7c15-40d3-a050-a374551e52ee x-project-id: 99d13f22-3618-4288-82b8-6512ded77e4f x-roles: admin response_json_paths: $.storage.`len`: 1