From 65a884ef562953944c8da6470b44dcc4f18eb181 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 14 Apr 2011 16:15:09 +0200
Subject: [PATCH] QA: also run gnt-cluster repair-disk-sizes

So that we don't happen again to break this forever without realising
it.

The patch also replaces one ' with ".

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 qa/ganeti-qa.py   | 11 ++++++++++-
 qa/qa-sample.json |  2 ++
 qa/qa_cluster.py  |  5 +++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py
index ded3cc5e9..f14153ebe 100755
--- a/qa/ganeti-qa.py
+++ b/qa/ganeti-qa.py
@@ -179,6 +179,13 @@ def RunClusterTests():
     RunTestIf(test, fn)
 
 
+def RunRepairDiskSizes():
+  """Run the repair disk-sizes test.
+
+  """
+  RunTestIf("cluster-repair-disk-sizes", qa_cluster.TestClusterRepairDiskSizes)
+
+
 def RunOsTests():
   """Runs all tests related to gnt-os.
 
@@ -425,13 +432,14 @@ def RunQa():
           RunTest(qa_rapi.TestRapiInstanceRemove, rapi_instance, use_client)
           del rapi_instance
 
-    if qa_config.TestEnabled('instance-add-plain-disk'):
+    if qa_config.TestEnabled("instance-add-plain-disk"):
       instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode)
       RunCommonInstanceTests(instance)
       RunGroupListTests()
       RunTest(qa_cluster.TestClusterEpo)
       RunExportImportTests(instance, pnode, None)
       RunDaemonTests(instance, pnode)
+      RunRepairDiskSizes()
       RunTest(qa_instance.TestInstanceRemove, instance)
       del instance
 
@@ -456,6 +464,7 @@ def RunQa():
             RunTest(qa_instance.TestInstanceStartup, instance)
           RunExportImportTests(instance, pnode, snode)
           RunHardwareFailureTests(instance, pnode, snode)
+          RunRepairDiskSizes()
           RunTest(qa_instance.TestInstanceRemove, instance)
           del instance
         finally:
diff --git a/qa/qa-sample.json b/qa/qa-sample.json
index 6e62f80fc..73b86b20b 100644
--- a/qa/qa-sample.json
+++ b/qa/qa-sample.json
@@ -62,6 +62,8 @@
     "cluster-reserved-lvs": true,
     "cluster-modify": true,
     "cluster-oob": true,
+    "cluster-redist-conf": true,
+    "cluster-repair-disk-sizes": true,
 
     "group-list": true,
     "group-rwops": true,
diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py
index 553c6ffc8..cca7133a7 100644
--- a/qa/qa_cluster.py
+++ b/qa/qa_cluster.py
@@ -466,3 +466,8 @@ def TestClusterCommand():
 def TestClusterDestroy():
   """gnt-cluster destroy"""
   AssertCommand(["gnt-cluster", "destroy", "--yes-do-it"])
+
+
+def TestClusterRepairDiskSizes():
+  """gnt-cluster repair-disk-sizes"""
+  AssertCommand(["gnt-cluster", "repair-disk-sizes"])
-- 
GitLab