Commit 60fba3e2 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic

Enable export tests in QA for all templates

While previous patches enabled QA tests of exports in instance moves,
this patch does the same for local exports.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 9c6ce365
......@@ -469,8 +469,7 @@ def RunExportImportTests(instance, inodes):
# FIXME: export explicitly bails out on file based storage. other non-lvm
# based storage types are untested, though. Also note that import could still
# work, but is deeply embedded into the "export" case.
if (qa_config.TestEnabled("instance-export") and
instance.disk_template not in constants.DTS_FILEBASED):
if qa_config.TestEnabled("instance-export"):
RunTest(qa_instance.TestInstanceExportNoTarget, instance)
pnode = inodes[0]
......
......@@ -1073,10 +1073,13 @@ def TestRecreateDisks(instance, inodes, othernodes):
def TestInstanceExport(instance, node):
"""gnt-backup export -n ..."""
name = instance.name
# Export does not work for file-based templates, thus we skip the test
options = ["gnt-backup", "export", "-n", node.primary]
# For files and shared files, the --long-sleep option should be used
if instance.disk_template in [constants.DT_FILE, constants.DT_SHARED_FILE]:
return
AssertCommand(["gnt-backup", "export", "-n", node.primary, name])
options.append("--long-sleep")
AssertCommand(options + [name])
return qa_utils.ResolveInstanceName(name)
......
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