ceilometer/ceilometer/tests/functional/gabbi/gabbits_prefix/clean-samples.yaml

52 lines
1.5 KiB
YAML

# Post a simple sample and confirm the created resource has
# reasonable URLs
fixtures:
- ConfigFixture
tests:
# POST one sample and verify its existence.
- name: post sample for meter
desc: post a single sample
url: /v2/meters/apples?direct=True
method: POST
request_headers:
content-type: application/json
data: |
[
{
"counter_name": "apples",
"project_id": "35b17138-b364-4e6a-a131-8f3099c5be68",
"user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff",
"counter_unit": "instance",
"counter_volume": 1,
"resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36",
"resource_metadata": {
"name2": "value2",
"name1": "value1"
},
"counter_type": "gauge"
}
]
response_json_paths:
$.[0].counter_name: apples
status: 201
response_headers:
content-type: application/json; charset=UTF-8
- name: get resources
desc: get the resources that exist because of the sample
url: /v2/resources
response_json_paths:
$.[0].metadata.name2: value2
- name: get resource
desc: get just one of those resources via self
url: $RESPONSE['$[0].links[0].href']
response_json_paths:
$.metadata.name2: value2
response_strings:
- /telemetry/