diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py index 1c2f74635e0ce8aa8b4d0fc4c051695762885f55..027c065905456fb7889c0ffd2acbb76426be02f7 100755 --- a/qa/ganeti-qa.py +++ b/qa/ganeti-qa.py @@ -201,16 +201,17 @@ def RunCommonInstanceTests(instance): if qa_config.TestEnabled('instance-rename'): rename_source = instance["name"] rename_target = qa_config.get("rename", None) - if rename_target is None: - print qa_utils.FormatError("Can rename instance, 'rename' entry is" - " missing from configuration") - else: - RunTest(qa_instance.TestInstanceShutdown, instance) + RunTest(qa_instance.TestInstanceShutdown, instance) + # perform instance rename to the same name + RunTest(qa_instance.TestInstanceRename, rename_source, rename_source) + RunTestIf("rapi", qa_rapi.TestRapiInstanceRename, rename_source, rename_source) + if rename_target is not None: + # perform instance rename to a different name, if we have one configured RunTest(qa_instance.TestInstanceRename, rename_source, rename_target) RunTest(qa_instance.TestInstanceRename, rename_target, rename_source) RunTestIf("rapi", qa_rapi.TestRapiInstanceRename, rename_source, rename_target) RunTestIf("rapi", qa_rapi.TestRapiInstanceRename, rename_target, rename_source) - RunTest(qa_instance.TestInstanceStartup, instance) + RunTest(qa_instance.TestInstanceStartup, instance) RunTestIf("tags", qa_tags.TestInstanceTags, instance)