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
1 changed files with 9 additions and 5 deletions

View File

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