Additionally support disk-type file in QA
authorKlaus Aehlig <aehlig@google.com>
Thu, 14 Mar 2013 11:52:48 +0000 (12:52 +0100)
committerGuido Trotter <ultrotter@google.com>
Tue, 2 Apr 2013 11:01:55 +0000 (13:01 +0200)
Also perform QA tests for the file disk template. The main reason
is that testing gnt-instance modify --new-primary requires a
manual move of disks, which is most easily simulated for files.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

qa/ganeti-qa.py
qa/qa-sample.json
qa/qa_instance.py

index f653fb5..e7f14ff 100755 (executable)
@@ -577,6 +577,8 @@ def RunInstanceTests():
      qa_instance.TestInstanceAddWithDrbdDisk, 2),
     ("instance-add-diskless", constants.DT_DISKLESS,
      qa_instance.TestInstanceAddDiskless, 1),
+    ("instance-add-file", constants.DT_FILE,
+     qa_instance.TestInstanceAddFile, 1),
   ]
 
   for (test_name, templ, create_fun, num_nodes) in instance_tests:
index 660989c..d4bf9bd 100644 (file)
     "node-failover": false,
 
     "instance-add-plain-disk": true,
+    "instance-add-file": true,
     "instance-add-drbd-disk": true,
     "instance-add-diskless": true,
     "instance-convert-disk": true,
index f1c2ab7..4607294 100644 (file)
@@ -290,6 +290,13 @@ def TestInstanceAddWithDrbdDisk(nodes):
 
 
 @InstanceCheck(None, INST_UP, RETURN_VALUE)
+def TestInstanceAddFile(nodes):
+  """gnt-instance add -t file"""
+  assert len(nodes) == 1
+  return _DiskTest(nodes[0].primary, constants.DT_FILE)
+
+
+@InstanceCheck(None, INST_UP, RETURN_VALUE)
 def TestInstanceAddDiskless(nodes):
   """gnt-instance add -t diskless"""
   assert len(nodes) == 1