LGTM, thanks

On Thu, Dec 19, 2013 at 5:09 PM, Klaus Aehlig <[email protected]> wrote:

> Due to the actual implementation of the '?' operator
> in our query language, it happily accepted essentially
> any value that was not 0 or False as being true. However,
> it was always only specified to work on boolean values.
> Therefore, our QA shouldn't test for this unspecified
> behavior to work.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  qa/qa_rapi.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/qa/qa_rapi.py b/qa/qa_rapi.py
> index 1b87f55..d1b4c80 100644
> --- a/qa/qa_rapi.py
> +++ b/qa/qa_rapi.py
> @@ -257,10 +257,13 @@ def TestRapiQuery():
>    for what in constants.QR_VIA_RAPI:
>      if what == constants.QR_JOB:
>        namefield = "id"
> +      trivial_filter = [qlang.OP_GE, namefield, 0]
>      elif what == constants.QR_EXPORT:
>        namefield = "export"
> +      trivial_filter = [qlang.OP_REGEXP, ".*", namefield]
>      else:
>        namefield = "name"
> +      trivial_filter = [qlang.OP_REGEXP, ".*", namefield]
>
>      all_fields = query.ALL_FIELDS[what].keys()
>      rnd.shuffle(all_fields)
> @@ -347,7 +350,7 @@ def TestRapiQuery():
>          # With filter
>          ("/2/query/%s" % what, compat.partial(_Check, all_fields), "PUT",
> {
>             "fields": all_fields,
> -           "filter": [qlang.OP_TRUE, namefield],
> +           "filter": trivial_filter
>             }),
>          ])
>
> --
> 1.8.5.1
>
>


-- 
-- 
Helga Velroyen | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to