From 3c87d614f775d585c6b1395d3686f358f86cbf41 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 4 Mar 2013 13:07:25 +0100 Subject: [PATCH] Fix QA with disabled file storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 <iustin@google.com> Reviewed-by: Michele Tartara <mtartara@google.com> --- 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 ac7fc90f9..ce683af53 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, -- GitLab