tests: more live verification

Sometime live tests fail for an yet unknown reason.

This change adds tests to help the debugging of this failure.

Related-bug: #1681955
Change-Id: Ifadf481794943b3283211dd4e276df503f73f9b0
This commit is contained in:
Mehdi Abaakouk 2017-04-27 15:43:33 +02:00
parent dd0a877361
commit 2a6c20794a
1 changed files with 56 additions and 1 deletions

View File

@ -375,10 +375,28 @@ tests:
$.archive_policy_name: gabbilive
$.name: live.io.rate
- name: assert metric is present in listing
GET: /v1/metric?id=$HISTORY['create metric with name and rule'].$RESPONSE['$.id']
response_json_paths:
$.`len`: 1
- name: assert metric is the only one with this policy
GET: /v1/metric?archive_policy_name=gabbilive
response_json_paths:
$.`len`: 1
- name: delete metric
DELETE: $LOCATION
DELETE: /v1/metric/$HISTORY['create metric with name and rule'].$RESPONSE['$.id']
status: 204
- name: assert metric is expunged
GET: $HISTORY['assert metric is present in listing'].$URL&status=delete
poll:
count: 360
delay: 1
response_json_paths:
$.`len`: 0
- name: create metric with name and policy
POST: /v1/metric
request_headers:
@ -401,6 +419,10 @@ tests:
DELETE: /v1/metric/$RESPONSE['$.id']
status: 204
- name: ensure the metric is delete
GET: /v1/metric/$HISTORY['get valid metric id'].$RESPONSE['$.id']
status: 404
- name: create metric bad archive policy
POST: /v1/metric
request_headers:
@ -540,6 +562,13 @@ tests:
$.project_id: 98e785d7-9487-4159-8ab8-8230ec37537a
$.display_name: "myvm"
- name: get vcpus metric
GET: /v1/metric/$HISTORY['get myresource resource'].$RESPONSE['$.metrics.vcpus']
status: 200
response_json_paths:
$.name: vcpus
$.resource.id: 2ae35573-7f9f-4bb1-aae8-dad8dff5706e
- name: search for myresource resource via user_id
POST: /v1/search/resource/myresource
request_headers:
@ -651,6 +680,14 @@ tests:
response_json_paths:
$.`len`: 0
- name: assert vcpus metric exists in listing
GET: /v1/metric?id=$HISTORY['get myresource resource'].$RESPONSE['$.metrics.vcpus']
poll:
count: 360
delay: 1
response_json_paths:
$.`len`: 1
- name: delete myresource resource
DELETE: /v1/resource/myresource/2ae35573-7f9f-4bb1-aae8-dad8dff5706e
status: 204
@ -660,12 +697,30 @@ tests:
GET: /v1/resource/myresource/2ae35573-7f9f-4bb1-aae8-dad8dff5706e
status: 404
- name: assert vcpus metric is really expurged
GET: $HISTORY['assert vcpus metric exists in listing'].$URL&status=delete
poll:
count: 360
delay: 1
response_json_paths:
$.`len`: 0
- name: post myresource resource no data
POST: /v1/resource/myresource
request_headers:
content-type: application/json
status: 400
- name: assert no metrics have the gabbilive policy
GET: $HISTORY['assert metric is the only one with this policy'].$URL
response_json_paths:
$.`len`: 0
- name: assert no delete metrics have the gabbilive policy
GET: $HISTORY['assert metric is the only one with this policy'].$URL&status=delete
response_json_paths:
$.`len`: 0
- name: delete single archive policy cleanup
DELETE: /v1/archive_policy/gabbilive
poll: