cloudkitty/cloudkitty/tests/gabbi/gabbits/v2-summary.yaml

89 lines
1.9 KiB
YAML

fixtures:
- ConfigFixtureStorageV2
- NowInfluxStorageDataFixture
tests:
- name: Get a summary
url: /v2/summary
status: 200
response_json_paths:
$.results.`len`: 1
$.total: 1
- name: Get a summary by project id
url: /v2/summary
status: 200
query_parameters:
groupby: project_id
response_json_paths:
$.results.`len`: 2
$.total: 2
- name: Get a summary by type
url: /v2/summary
status: 200
query_parameters:
groupby: type
response_json_paths:
$.results.`len`: 7
$.total: 7
- name: Get a summary by type and project_id
url: /v2/summary
status: 200
query_parameters:
groupby: [type, project_id]
response_json_paths:
$.results.`len`: 14
$.total: 14
- name: Get a summary by type and project_id limit 5 offset 0
url: /v2/summary
status: 200
query_parameters:
groupby: [type, project_id]
limit: 5
offset: 0
response_json_paths:
$.results.`len`: 5
$.total: 14
- name: Get a summary by type and project_id limit 5 offset 5
url: /v2/summary
status: 200
query_parameters:
groupby: [type, project_id]
limit: 5
offset: 5
response_json_paths:
$.results.`len`: 5
$.total: 14
- name: Get a summary with a start and end date
url: /v2/summary
status: 200
query_parameters:
begin: "2017-01-01T00:00:00+00:00"
end: "2017-01-02T00:00:00+00:00"
response_json_paths:
$.results.`len`: 0
$.total: 0
- name: Get a summary grouped by time
url: /v2/summary
status: 200
query_parameters:
groupby: [time]
response_json_paths:
$.results.`len`: 1
$.total: 1
- name: Get a summary grouped by time and project_id
url: /v2/summary
status: 200
query_parameters:
groupby: [time, project_id]
response_json_paths:
$.results.`len`: 2
$.total: 2