Commit 6970c89c authored by Klaus Aehlig's avatar Klaus Aehlig Committed by Guido Trotter

Additionally support disk-type file in QA

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: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3438e1f8
...@@ -577,6 +577,8 @@ def RunInstanceTests(): ...@@ -577,6 +577,8 @@ def RunInstanceTests():
qa_instance.TestInstanceAddWithDrbdDisk, 2), qa_instance.TestInstanceAddWithDrbdDisk, 2),
("instance-add-diskless", constants.DT_DISKLESS, ("instance-add-diskless", constants.DT_DISKLESS,
qa_instance.TestInstanceAddDiskless, 1), 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: for (test_name, templ, create_fun, num_nodes) in instance_tests:
......
...@@ -170,6 +170,7 @@ ...@@ -170,6 +170,7 @@
"node-failover": false, "node-failover": false,
"instance-add-plain-disk": true, "instance-add-plain-disk": true,
"instance-add-file": true,
"instance-add-drbd-disk": true, "instance-add-drbd-disk": true,
"instance-add-diskless": true, "instance-add-diskless": true,
"instance-convert-disk": true, "instance-convert-disk": true,
......
...@@ -289,6 +289,13 @@ def TestInstanceAddWithDrbdDisk(nodes): ...@@ -289,6 +289,13 @@ def TestInstanceAddWithDrbdDisk(nodes):
constants.DT_DRBD8) constants.DT_DRBD8)
@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) @InstanceCheck(None, INST_UP, RETURN_VALUE)
def TestInstanceAddDiskless(nodes): def TestInstanceAddDiskless(nodes):
"""gnt-instance add -t diskless""" """gnt-instance add -t diskless"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment