diff --git a/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml b/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml index 6de92667b..3e16e6be7 100644 --- a/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml +++ b/aodh/tests/functional/gabbi/gabbits-live/alarms.yaml @@ -5,15 +5,13 @@ defaults: tests: - name: list alarms none desc: Lists alarms, none yet exist - url: /v2/alarms - method: GET + GET: /v2/alarms response_strings: - "[]" - name: try to PUT an alarm desc: what does PUT do - url: /v2/alarms - method: PUT + PUT: /v2/alarms request_headers: content-type: application/json data: @@ -28,8 +26,7 @@ tests: - name: createAlarm desc: Creates an alarm. - url: /v2/alarms - method: POST + POST: /v2/alarms request_headers: content-type: application/json data: @@ -49,8 +46,7 @@ tests: - name: showAlarm desc: Shows information for a specified alarm. - url: /v2/alarms/$RESPONSE['$.alarm_id'] - method: GET + GET: /v2/alarms/$RESPONSE['$.alarm_id'] response_json_paths: $.severity: low $.alarm_id: $RESPONSE['$.alarm_id'] @@ -61,8 +57,7 @@ tests: - name: updateAlarm desc: Updates a specified alarm. - url: /v2/alarms/$RESPONSE['$.alarm_id'] - method: PUT + PUT: /v2/alarms/$RESPONSE['$.alarm_id'] request_headers: content-type: application/json data: @@ -81,18 +76,16 @@ tests: - name: showAlarmHistory desc: Assembles the history for a specified alarm. - url: /v2/alarms/$RESPONSE['$.alarm_id']/history?q.field=type&q.op=eq&q.value=rule%20change - method: GET + GET: /v2/alarms/$RESPONSE['$.alarm_id']/history?q.field=type&q.op=eq&q.value=rule%20change response_json_paths: $[0].type: rule change - name: updateAlarmState desc: Sets the state of a specified alarm. - url: /v2/alarms/$RESPONSE['$[0].alarm_id']/state + PUT: /v2/alarms/$RESPONSE['$[0].alarm_id']/state request_headers: content-type: application/json data: '"alarm"' - method: PUT # TODO(chdent): really? Of what possible use is this? response_json_paths: $: alarm @@ -100,15 +93,13 @@ tests: # Get a list of alarms so we can extract an id for the next test - name: list alarms for data desc: Lists alarms, only one - url: /v2/alarms - method: GET + GET: /v2/alarms response_json_paths: $[0].name: added_alarm_defaults - name: showAlarmState desc: Gets the state of a specified alarm. - url: /v2/alarms/$RESPONSE['$[0].alarm_id']/state - method: GET + GET: /v2/alarms/$RESPONSE['$[0].alarm_id']/state response_headers: content-type: application/json; charset=UTF-8 response_json_paths: @@ -116,20 +107,17 @@ tests: - name: list alarms one desc: Lists alarms, only one - url: /v2/alarms - method: GET + GET: /v2/alarms response_json_paths: $[0].name: added_alarm_defaults - name: deleteAlarm desc: Deletes a specified alarm. - url: /v2/alarms/$RESPONSE['$[0].alarm_id'] - method: DELETE + DELETE: /v2/alarms/$RESPONSE['$[0].alarm_id'] status: 204 - name: list alarms none end desc: Lists alarms, none now exist - url: /v2/alarms - method: GET + GET: /v2/alarms response_strings: - "[]" diff --git a/aodh/tests/functional/gabbi/gabbits/alarms.yaml b/aodh/tests/functional/gabbi/gabbits/alarms.yaml index b893fcfe3..6a536b99e 100644 --- a/aodh/tests/functional/gabbi/gabbits/alarms.yaml +++ b/aodh/tests/functional/gabbi/gabbits/alarms.yaml @@ -6,15 +6,13 @@ fixtures: tests: - name: list alarms none desc: Lists alarms, none yet exist - url: /v2/alarms - method: GET + GET: /v2/alarms response_strings: - "[]" - name: try to PUT an alarm desc: what does PUT do - url: /v2/alarms - method: PUT + PUT: /v2/alarms request_headers: content-type: application/json data: @@ -29,8 +27,7 @@ tests: - name: createAlarm desc: Creates an alarm. - url: /v2/alarms - method: POST + POST: /v2/alarms request_headers: content-type: application/json data: @@ -51,8 +48,7 @@ tests: - name: showAlarm desc: Shows information for a specified alarm. - url: /v2/alarms/$RESPONSE['$.alarm_id'] - method: GET + GET: /v2/alarms/$RESPONSE['$.alarm_id'] response_json_paths: $.severity: low $.alarm_id: $RESPONSE['$.alarm_id'] @@ -63,8 +59,7 @@ tests: - name: updateAlarm desc: Updates a specified alarm. - url: /v2/alarms/$RESPONSE['$.alarm_id'] - method: PUT + PUT: /v2/alarms/$RESPONSE['$.alarm_id'] request_headers: content-type: application/json data: @@ -83,18 +78,16 @@ tests: - name: showAlarmHistory desc: Assembles the history for a specified alarm. - url: /v2/alarms/$RESPONSE['$.alarm_id']/history?q.field=type&q.op=eq&q.value=rule%20change - method: GET + GET: /v2/alarms/$RESPONSE['$.alarm_id']/history?q.field=type&q.op=eq&q.value=rule%20change response_json_paths: $[0].type: rule change - name: updateAlarmState desc: Sets the state of a specified alarm. - url: /v2/alarms/$RESPONSE['$[0].alarm_id']/state + PUT: /v2/alarms/$RESPONSE['$[0].alarm_id']/state request_headers: content-type: application/json data: '"alarm"' - method: PUT # TODO(chdent): really? Of what possible use is this? response_json_paths: $: alarm @@ -102,15 +95,13 @@ tests: # Get a list of alarms so we can extract an id for the next test - name: list alarms for data desc: Lists alarms, only one - url: /v2/alarms - method: GET + GET: /v2/alarms response_json_paths: $[0].name: added_alarm_defaults - name: showAlarmState desc: Gets the state of a specified alarm. - url: /v2/alarms/$RESPONSE['$[0].alarm_id']/state - method: GET + GET: /v2/alarms/$RESPONSE['$[0].alarm_id']/state response_headers: content-type: application/json response_json_paths: @@ -118,20 +109,17 @@ tests: - name: list alarms one desc: Lists alarms, only one - url: /v2/alarms - method: GET + GET: /v2/alarms response_json_paths: $[0].name: added_alarm_defaults - name: deleteAlarm desc: Deletes a specified alarm. - url: /v2/alarms/$RESPONSE['$[0].alarm_id'] - method: DELETE + DELETE: /v2/alarms/$RESPONSE['$[0].alarm_id'] status: 204 - name: list alarms none end desc: Lists alarms, none now exist - url: /v2/alarms - method: GET + GET: /v2/alarms response_strings: - "[]" diff --git a/aodh/tests/functional/gabbi/gabbits/basic.yaml b/aodh/tests/functional/gabbi/gabbits/basic.yaml index c2ad2c997..d56a0de67 100644 --- a/aodh/tests/functional/gabbi/gabbits/basic.yaml +++ b/aodh/tests/functional/gabbi/gabbits/basic.yaml @@ -8,7 +8,7 @@ tests: # Root gives us some information on where to go from here. - name: quick root check - url: / + GET: / response_headers: content-type: application/json response_strings: @@ -20,5 +20,5 @@ tests: # NOTE(chdent): Ideally since / has a links ref to /v2, /v2 ought not 404! - name: v2 visit desc: this demonstrates a bug in the info in / - url: $RESPONSE['versions.values.[0].links.[0].href'] + GET: $RESPONSE['versions.values.[0].links.[0].href'] status: 404 diff --git a/aodh/tests/functional/gabbi/gabbits/capabilities.yaml b/aodh/tests/functional/gabbi/gabbits/capabilities.yaml index 9fe176557..66a7d7a74 100644 --- a/aodh/tests/functional/gabbi/gabbits/capabilities.yaml +++ b/aodh/tests/functional/gabbi/gabbits/capabilities.yaml @@ -7,6 +7,6 @@ fixtures: tests: - name: get capabilities - url: /v2/capabilities + GET: /v2/capabilities response_json_paths: $.alarm_storage.['storage:production_ready']: true diff --git a/setup.cfg b/setup.cfg index 59a386f01..62f24bd78 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,7 +64,7 @@ test = tempest>=11.0.0 # Apache-2.0 testrepository>=0.0.18 testresources>=0.2.4 # Apache-2.0/BSD - gabbi>=0.12.0 # Apache-2.0 + gabbi>=1.7.0 # Apache-2.0 # Provides subunit-trace os-testr python-subunit>=0.0.18