Correct bad use response_strings in live.yaml

response_strings wants a list, not a string. In gabbi earlier than
1.33.0 it accept a string and then iterated checking for each single
character in the response body. So still passing.

This fixes recent failures by putting the necessary '-' at the start
of the search string. It's an easy bug to make and then never
notice, which is why gabbi 1.33.0 is all uptight about it.

Change-Id: I02042c0b5005a50b3760c9aae67ad4d0eeb69e04
(cherry picked from commit f9fc5a7449)
(cherry picked from commit b02b8bb220)
This commit is contained in:
Chris Dent 2017-03-21 16:11:37 +00:00 committed by gordon chung
parent cb650e3d73
commit ad739d4795
1 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,7 @@ tests:
$.definition[2].points: 5
$.definition[2].timespan: "0:05:00"
response_strings:
'"aggregation_methods": ["max", "min", "mean"]'
- '"aggregation_methods": ["max", "min", "mean"]'
- name: get wrong accept
desc: invalid 'accept' header
@ -354,7 +354,7 @@ tests:
url: /v1/archive_policy_rule
status: 200
response_strings:
'"metric_pattern": "live.*", "archive_policy_name": "gabbilive", "name": "gabbilive_rule"'
- '"metric_pattern": "live.*", "archive_policy_name": "gabbilive", "name": "gabbilive_rule"'
- name: get unknown archive policy rule
url: /v1/archive_policy_rule/foo
@ -567,7 +567,7 @@ tests:
=:
id: "2ae35573-7f9f-4bb1-aae8-dad8dff5706e"
response_strings:
'"user_id": "126204ef-989a-46fd-999b-ee45c8108f31"'
- '"user_id": "126204ef-989a-46fd-999b-ee45c8108f31"'
- name: search for myresource resource via user_id and project_id
url: /v1/search/resource/generic
@ -581,7 +581,7 @@ tests:
- =:
project_id: "98e785d7-9487-4159-8ab8-8230ec37537a"
response_strings:
'"id": "2ae35573-7f9f-4bb1-aae8-dad8dff5706e"'
- '"id": "2ae35573-7f9f-4bb1-aae8-dad8dff5706e"'
- name: patch myresource resource
url: /v1/resource/myresource/2ae35573-7f9f-4bb1-aae8-dad8dff5706e