From 687205ecebdb316c349c7db8087c06f8b2fd2436 Mon Sep 17 00:00:00 2001 From: gord chung Date: Thu, 9 Feb 2017 17:23:01 +0000 Subject: [PATCH] gabbi: use history gabbi supports grabbing historical queries. leverage that so we don't need to make redundant requests to grab same data. Change-Id: Ic9f97f47a1cc9af91048dc98e4b6b1cc23933726 --- aodh/tests/functional/gabbi/gabbits-live/alarms.yaml | 10 ++-------- aodh/tests/functional/gabbi/gabbits/alarms.yaml | 10 ++-------- setup.cfg | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml b/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml index 3e16e6be7..0f7a73ef7 100644 --- a/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml +++ b/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml @@ -91,7 +91,7 @@ tests: $: alarm # Get a list of alarms so we can extract an id for the next test - - name: list alarms for data + - name: list alarms desc: Lists alarms, only one GET: /v2/alarms response_json_paths: @@ -105,15 +105,9 @@ tests: response_json_paths: $: alarm - - name: list alarms one - desc: Lists alarms, only one - GET: /v2/alarms - response_json_paths: - $[0].name: added_alarm_defaults - - name: deleteAlarm desc: Deletes a specified alarm. - DELETE: /v2/alarms/$RESPONSE['$[0].alarm_id'] + DELETE: /v2/alarms/$HISTORY['list alarms'].$RESPONSE['$[0].alarm_id'] status: 204 - name: list alarms none end diff --git a/aodh/tests/functional/gabbi/gabbits/alarms.yaml b/aodh/tests/functional/gabbi/gabbits/alarms.yaml index 6a536b99e..40ebe11ad 100644 --- a/aodh/tests/functional/gabbi/gabbits/alarms.yaml +++ b/aodh/tests/functional/gabbi/gabbits/alarms.yaml @@ -93,7 +93,7 @@ tests: $: alarm # Get a list of alarms so we can extract an id for the next test -- name: list alarms for data +- name: list alarms desc: Lists alarms, only one GET: /v2/alarms response_json_paths: @@ -107,15 +107,9 @@ tests: response_json_paths: $: alarm -- name: list alarms one - desc: Lists alarms, only one - GET: /v2/alarms - response_json_paths: - $[0].name: added_alarm_defaults - - name: deleteAlarm desc: Deletes a specified alarm. - DELETE: /v2/alarms/$RESPONSE['$[0].alarm_id'] + DELETE: /v2/alarms/$HISTORY['list alarms'].$RESPONSE['$[0].alarm_id'] status: 204 - name: list alarms none end diff --git a/setup.cfg b/setup.cfg index aeb11ca74..d67b561b1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,7 +63,7 @@ test = tempest>=11.0.0 # Apache-2.0 testrepository>=0.0.18 testresources>=0.2.4 # Apache-2.0/BSD - gabbi>=1.7.0 # Apache-2.0 + gabbi>=1.30.0 # Apache-2.0 # Provides subunit-trace os-testr python-subunit>=0.0.18