Skip to content
Snippets Groups Projects
Commit 8a4e8898 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

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

Reviewed-by: ultrotter
parent 7910e7a5
No related branches found
No related tags found
No related merge requests found
...@@ -151,6 +151,9 @@ def RunCommonInstanceTests(instance): ...@@ -151,6 +151,9 @@ def RunCommonInstanceTests(instance):
RunTest(qa_instance.TestInstanceReinstall, instance) RunTest(qa_instance.TestInstanceReinstall, instance)
RunTest(qa_instance.TestInstanceStartup, instance) RunTest(qa_instance.TestInstanceStartup, instance)
if qa_config.TestEnabled('instance-reboot'):
RunTest(qa_instance.TestInstanceReboot, instance)
if qa_config.TestEnabled('tags'): if qa_config.TestEnabled('tags'):
RunTest(qa_tags.TestInstanceTags, instance) RunTest(qa_tags.TestInstanceTags, instance)
......
...@@ -61,6 +61,7 @@ tests: ...@@ -61,6 +61,7 @@ tests:
instance-export: True instance-export: True
instance-import: True instance-import: True
instance-reinstall: True instance-reinstall: True
instance-reboot: True
instance-shutdown: True instance-shutdown: True
instance-automatic-restart: False instance-automatic-restart: False
instance-consecutive-failures: False instance-consecutive-failures: False
......
...@@ -111,6 +111,18 @@ def TestInstanceShutdown(instance): ...@@ -111,6 +111,18 @@ def TestInstanceShutdown(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0) 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') @qa_utils.DefineHook('instance-reinstall')
def TestInstanceReinstall(instance): def TestInstanceReinstall(instance):
"""gnt-instance reinstall""" """gnt-instance reinstall"""
......
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