From c9cf3f1a68b5e610aa900fed120cf11ce8a65754 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Thu, 21 Feb 2013 15:17:44 +0100
Subject: [PATCH] qa_os: Disable checks for virtual clusters

The OS definitions are not virtualized. Tests configuring different OS
definitions on different nodes don't work properly.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
---
 qa/ganeti-qa.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py
index 1a694f970..39d419a4e 100755
--- a/qa/ganeti-qa.py
+++ b/qa/ganeti-qa.py
@@ -205,6 +205,8 @@ def RunOsTests():
   """Runs all tests related to gnt-os.
 
   """
+  os_enabled = ["os", qa_config.NoVirtualCluster]
+
   if qa_config.TestEnabled("rapi"):
     rapi_getos = qa_rapi.GetOperatingSystems
   else:
@@ -214,21 +216,21 @@ def RunOsTests():
     qa_os.TestOsList,
     qa_os.TestOsDiagnose,
     ]:
-    RunTestIf("os", fn)
+    RunTestIf(os_enabled, fn)
 
   for fn in [
     qa_os.TestOsValid,
     qa_os.TestOsInvalid,
     qa_os.TestOsPartiallyValid,
     ]:
-    RunTestIf("os", fn, rapi_getos)
+    RunTestIf(os_enabled, fn, rapi_getos)
 
   for fn in [
     qa_os.TestOsModifyValid,
     qa_os.TestOsModifyInvalid,
     qa_os.TestOsStatesNonExisting,
     ]:
-    RunTestIf("os", fn)
+    RunTestIf(os_enabled, fn)
 
 
 def RunCommonInstanceTests(instance):
-- 
GitLab