Skip to content
Snippets Groups Projects
Commit 18337ca9 authored by Iustin Pop's avatar Iustin Pop
Browse files

Implement instance rename QA tests


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent c4a73785
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,11 @@ def RunCommonInstanceTests(instance):
if qa_config.TestEnabled('instance-reboot'):
RunTest(qa_instance.TestInstanceReboot, instance)
if qa_config.TestEnabled('instance-rename'):
RunTest(qa_instance.TestInstanceShutdown, instance)
RunTest(qa_instance.TestInstanceRename, instance)
RunTest(qa_instance.TestInstanceStartup, instance)
if qa_config.TestEnabled('tags'):
RunTest(qa_tags.TestInstanceTags, instance)
......
......@@ -62,17 +62,18 @@
"instance-add-plain-disk": true,
"instance-add-drbd-disk": true,
"instance-list": true,
"instance-automatic-restart": false,
"instance-consecutive-failures": false,
"instance-export": true,
"instance-failover": true,
"instance-import": true,
"instance-info": true,
"instance-list": true,
"instance-modify": true,
"instance-export": true,
"instance-import": true,
"instance-reinstall": true,
"instance-reboot": true,
"instance-reinstall": true,
"instance-rename": true,
"instance-shutdown": true,
"instance-automatic-restart": false,
"instance-consecutive-failures": false,
"# This test might fail with certain hypervisor types, depending": null,
"# on whether they support the `gnt-instance console' command.": null,
......
......@@ -127,6 +127,23 @@ def TestInstanceReinstall(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
def TestInstanceRename(instance):
"""gnt-instance rename"""
master = qa_config.GetMasterNode()
rename_source = instance['name']
rename_target = qa_config.get('rename', None)
if rename_target is None:
print qa_utils.FormatError('"rename" entry is missing')
return
for name1, name2 in [(rename_source, rename_target),
(rename_target, rename_source)]:
cmd = ['gnt-instance', 'rename', name1, name2]
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0)
def TestInstanceFailover(instance):
"""gnt-instance failover"""
master = qa_config.GetMasterNode()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment