On Mon, Mar 4, 2013 at 1:33 PM, Iustin Pop <[email protected]> wrote:

> Currently QA tries to use “gnt-node list-storage” with all storage
> types, but when file storage is disabled this will fail.
>
> The patch changes it so that if file storage is disabled, we test that
> indeed fails, and otherwise we include it in the regular tests.
>
> Signed-off-by: Iustin Pop <[email protected]>
> ---
>  qa/qa_node.py | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/qa/qa_node.py b/qa/qa_node.py
> index ac7fc90..ce683af 100644
> --- a/qa/qa_node.py
> +++ b/qa/qa_node.py
> @@ -1,7 +1,7 @@
>  #
>  #
>
> -# Copyright (C) 2007, 2011, 2012 Google Inc.
> +# Copyright (C) 2007, 2011, 2012, 2013 Google Inc.
>  #
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> @@ -112,8 +112,18 @@ def TestNodeStorage():
>    master = qa_config.GetMasterNode()
>
>    for storage_type in constants.VALID_STORAGE_TYPES:
> +
> +    cmd = ["gnt-node", "list-storage", "--storage-type", storage_type]
> +
> +    # Skip file storage if not enabled, otherwise QA will fail; we
> +    # just test for basic failure, but otherwise skip the rest of the
> +    # tests
> +    if storage_type == constants.ST_FILE and not
> constants.ENABLE_FILE_STORAGE:
> +      AssertCommand(cmd, fail=True)
> +      continue
> +
>      # Test simple list
> -    AssertCommand(["gnt-node", "list-storage", "--storage-type",
> storage_type])
> +    AssertCommand(cmd)
>
>      # Test all storage fields
>      cmd = ["gnt-node", "list-storage", "--storage-type", storage_type,
> --
> 1.8.1.3
>
>
LGTM, thanks.

Michele

Reply via email to