On Mon, Nov 11, 2013 at 8:54 PM, Klaus Aehlig <[email protected]> wrote:
> Historically, Ganeti would partially handle syntactically incorrect
> luxi requests, if the outer structure was that of SubmitManyJobs
> request. Moreover, this behavior was verified by a test. We changed to
> completely reject syntactically incorrect luxi requests and decided
> that this semantics was more desirable. Hence adapt the test
> accordingly.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  lib/client/gnt_debug.py | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/lib/client/gnt_debug.py b/lib/client/gnt_debug.py
> index 7910a19..da1dbef 100644
> --- a/lib/client/gnt_debug.py
> +++ b/lib/client/gnt_debug.py
> @@ -311,16 +311,14 @@ def _TestJobSubmission(opts):
>         opcodes.OpTestDelay(duration=0, dry_run=True)],
>        ops,
>        ]
> -    result = cl.SubmitManyJobs(jobs)
> -    if not (len(result) == 2 and
> -            compat.all(len(i) == 2 for i in result) and
> -            isinstance(result[0][1], int) and
> -            isinstance(result[1][1], basestring) and
> -            result[0][0] and not result[1][0]):
> -      raise errors.OpExecError("Submitting multiple jobs did not work as"
> -                               " expected, result %s" % result)
> -    assert len(result) == 2
> -
> +    try:
> +      cl.SubmitManyJobs(jobs)
> +    except errors.GenericError, err:
> +      if opts.debug:
> +        ToStdout("Ignoring error for 'wrong priority' test: %s", err)
> +    else:
> +      raise errors.OpExecError("Submitting manyjobs with an incorrect one"
> +                               " did not fail when it should.")
>    ToStdout("Job submission tests were successful")
>
>
> --
> 1.8.4.1
>

LGTM, thanks.

Michele

-- 
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