From 729c43772ad2c4fe93c27144722856aca905073d Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 22 Oct 2010 16:53:29 +0200
Subject: [PATCH] Fix QA mixup of node/instance tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There are two node tests that are run from RunCommonInstanceTests, which is the
bad placeβ€”it causes these node tests to be run three times instead of once.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 qa/ganeti-qa.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py
index 23586ce1f..8247a0dea 100755
--- a/qa/ganeti-qa.py
+++ b/qa/ganeti-qa.py
@@ -213,15 +213,20 @@ def RunCommonInstanceTests(instance):
   if qa_config.TestEnabled('tags'):
     RunTest(qa_tags.TestInstanceTags, instance)
 
+  if qa_rapi.Enabled():
+    RunTest(qa_rapi.TestInstance, instance)
+
+
+def RunCommonNodeTests():
+  """Run a few common node tests.
+
+  """
   if qa_config.TestEnabled('node-volumes'):
     RunTest(qa_node.TestNodeVolumes)
 
   if qa_config.TestEnabled("node-storage"):
     RunTest(qa_node.TestNodeStorage)
 
-  if qa_rapi.Enabled():
-    RunTest(qa_rapi.TestInstance, instance)
-
 
 def RunExportImportTests(instance, pnode, snode):
   """Tries to export and import the instance.
@@ -363,6 +368,8 @@ def main():
   if qa_config.TestEnabled('tags'):
     RunTest(qa_tags.TestClusterTags)
 
+  RunCommonNodeTests()
+
   pnode = qa_config.AcquireNode(exclude=qa_config.GetMasterNode())
   try:
     if qa_config.TestEnabled('node-readd'):
-- 
GitLab