Commit 8a4e8898 authored by Michael Hanselmann's avatar Michael Hanselmann

Forward-port: Add QA tests for “gnt-instance reboot”

Reviewed-by: ultrotter
parent 7910e7a5
......@@ -151,6 +151,9 @@ def RunCommonInstanceTests(instance):
RunTest(qa_instance.TestInstanceReinstall, instance)
RunTest(qa_instance.TestInstanceStartup, instance)
if qa_config.TestEnabled('instance-reboot'):
RunTest(qa_instance.TestInstanceReboot, instance)
if qa_config.TestEnabled('tags'):
RunTest(qa_tags.TestInstanceTags, instance)
......
......@@ -61,6 +61,7 @@ tests:
instance-export: True
instance-import: True
instance-reinstall: True
instance-reboot: True
instance-shutdown: True
instance-automatic-restart: False
instance-consecutive-failures: False
......
......@@ -111,6 +111,18 @@ def TestInstanceShutdown(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-reboot')
def TestInstanceReboot(instance):
"""gnt-instance reboot"""
master = qa_config.GetMasterNode()
for reboottype in ["soft", "hard", "full"]:
cmd = ['gnt-instance', 'reboot', '--type=%s' % reboottype,
instance['name']]
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-reinstall')
def TestInstanceReinstall(instance):
"""gnt-instance reinstall"""
......
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