Commit 552633e1 authored by Thomas Thrainer' via ganeti-devel's avatar Thomas Thrainer' via ganeti-devel Committed by Klaus Aehlig
Browse files

Run disk template specific tests only if possible



Only run disk template specific tests if the corresponding disk template
is really enabled. Also, move the (up to now wrong) check out of
qa_performance.py to ganeti-qa.py, so no no-time test runs are reported
in the log.
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent c2a97cee
......@@ -801,8 +801,10 @@ def RunPerformanceTests():
RunTest(qa_performance.TestJobQueueSubmissionPerformance)
if qa_config.TestEnabled("parallel-performance"):
RunTest(qa_performance.TestParallelDRBDInstanceCreationPerformance)
RunTest(qa_performance.TestParallelPlainInstanceCreationPerformance)
if qa_config.IsTemplateSupported(constants.DT_DRBD8):
RunTest(qa_performance.TestParallelDRBDInstanceCreationPerformance)
if qa_config.IsTemplateSupported(constants.DT_PLAIN):
RunTest(qa_performance.TestParallelPlainInstanceCreationPerformance)
if qa_config.IsTemplateSupported(constants.DT_DRBD8):
inodes = qa_config.AcquireManyNodes(2)
......
......@@ -533,8 +533,7 @@ def TestParallelDRBDInstanceCreationPerformance():
"""PERFORMANCE: Parallel DRBD backed instance creation.
"""
if not qa_config.IsTemplateSupported(constants.DT_DRBD8):
print(qa_logging.FormatInfo("DRBD disk template not supported, skipping"))
assert qa_config.IsTemplateSupported(constants.DT_DRBD8)
nodes = list(_AcquireAllNodes())
_TestParallelInstanceCreationAndRemoval(max_instances=len(nodes) * 2,
......@@ -546,8 +545,7 @@ def TestParallelPlainInstanceCreationPerformance():
"""PERFORMANCE: Parallel plain backed instance creation.
"""
if not qa_config.IsTemplateSupported(constants.DT_PLAIN):
print(qa_logging.FormatInfo("Plain disk template not supported, skipping"))
assert qa_config.IsTemplateSupported(constants.DT_PLAIN)
nodes = list(_AcquireAllNodes())
_TestParallelInstanceCreationAndRemoval(max_instances=len(nodes) * 2,
......@@ -571,9 +569,7 @@ def _TestInstanceOperationInParallelToInstanceCreation(*cmds):
job_driver.AddJob(
job_id, running_fn=functools.partial(_SubmitNextCommand, cmd_idx + 1))
if not qa_config.IsTemplateSupported(constants.DT_DRBD8):
print(qa_logging.FormatInfo("DRBD disk template not supported, skipping"))
assert qa_config.IsTemplateSupported(constants.DT_DRBD8)
assert len(cmds) > 0
job_driver = _JobQueueDriver()
......
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