Commit 7d7609a3 authored by Michael Hanselmann's avatar Michael Hanselmann

Add basic QA tests for DRBD 8.

Reviewed-by: schreiberal
parent 6852c52f
......@@ -269,18 +269,25 @@ def main():
RunTest(qa_instance.TestInstanceRemove, instance)
del instance
if qa_config.TestEnabled('instance-add-remote-raid-disk'):
snode = qa_config.AcquireNode(exclude=pnode)
try:
instance = RunTest(qa_instance.TestInstanceAddWithRemoteRaidDisk,
pnode, snode)
RunCommonInstanceTests(instance)
RunExportImportTests(instance, pnode)
RunHardwareFailureTests(instance, pnode, snode)
RunTest(qa_instance.TestInstanceRemove, instance)
del instance
finally:
qa_config.ReleaseNode(snode)
multinode_tests = [
('instance-add-remote-raid-disk',
qa_instance.TestInstanceAddWithRemoteRaidDisk),
('instance-add-drbd-disk',
qa_instance.TestInstanceAddWithDrbdDisk),
]
for name, func in multinode_tests:
if qa_config.TestEnabled(name):
snode = qa_config.AcquireNode(exclude=pnode)
try:
instance = RunTest(func, pnode, snode)
RunCommonInstanceTests(instance)
RunExportImportTests(instance, pnode)
RunHardwareFailureTests(instance, pnode, snode)
RunTest(qa_instance.TestInstanceRemove, instance)
del instance
finally:
qa_config.ReleaseNode(snode)
finally:
qa_config.ReleaseNode(pnode)
......
......@@ -48,6 +48,7 @@ tests:
instance-add-plain-disk: True
instance-add-local-mirror-disk: True
instance-add-remote-raid-disk: True
instance-add-drbd-disk: False
instance-list: True
instance-failover: True
instance-info: True
......
......@@ -82,6 +82,13 @@ def TestInstanceAddWithRemoteRaidDisk(node, node2):
'remote_raid1')
@qa_utils.DefineHook('instance-add-drbd-disk')
def TestInstanceAddWithDrbdDisk(node, node2):
"""gnt-instance add -t drbd"""
return _DiskTest("%s:%s" % (node['primary'], node2['primary']),
'drbd')
@qa_utils.DefineHook('instance-remove')
def TestInstanceRemove(instance):
"""gnt-instance remove"""
......
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