Use gnocchi search api to check gnocchi resources

When running the tests against production cloud, the resource list call
would return tons of records, so it's better to use resource search api
instead to check the resources.

Change-Id: I723f99e5b19ddf4dc2d9c20738e818b7399f54a4
This commit is contained in:
Rocky 2019-07-01 14:32:56 +10:00
parent fc990c4ada
commit e94a3f619a

View File

@ -54,14 +54,18 @@ tests:
- name: check gnocchi resources - name: check gnocchi resources
desc: Check the gnocchi resources for this two servers exists desc: Check the gnocchi resources for this two servers exists
url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource/instance url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/search/resource/instance
method: GET method: POST
request_headers:
content-type: application/json
data:
=:
server_group: $RESPONSE['$.servers[0].metadata."metering.server_group"']
poll: poll:
count: 30 count: 30
delay: 1 delay: 1
response_strings: response_json_paths:
- '"id": "$RESPONSE["$.servers[0].id"]"' $.`len`: 2
- '"id": "$RESPONSE["$.servers[1].id"]"'
- name: check event - name: check event
desc: Check panko for new instance.create.end event desc: Check panko for new instance.create.end event