On Thu, Jan 05, 2012 at 03:50:20PM +0000, Andrea Spadaccini wrote:
> Fix an error in the disk parameters tests (the arguments to gnt-cluster
> were not passed correctly), move them to separate functions and add a
> few more tests for the most recent parameters.
>
> Signed-off-by: Andrea Spadaccini <[email protected]>
One general comment: this doubles the number of calls (3→6) and also
adds them in cluster modify (so 3→12). Given that each separate call
does create a job, submit it, etc., this will increase the QA time
somewhat needlessly (all these could be unittests instead). I.e. it's
fine to run one or two parameters, but you don't need to cmd-line QA all
of them.
Anyway, that aside:
> +# data for testing failures due to bad keys/values for disk parameters
> +_FAIL_PARAMS = ("nonexistent:resync-rate=1",
> + "drbd:nonexistent=1",
> + "drbd:resync-rate=invalid",
> + "drbd:data-stripes=invalid",
> + "drbd:meta-stripes=invalid",
> + "plain:stripes=invalid",
> + )
You're using tuples as list, please don't do that. If you iterate over a
tuple it means you're misusing it.
thanks,
iustin