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

Add QA test for “gnt-instance console”

Reviewed-by: iustinp
parent 51c6e7b5
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,9 @@ def RunCommonInstanceTests(instance): ...@@ -143,6 +143,9 @@ def RunCommonInstanceTests(instance):
if qa_config.TestEnabled('instance-modify'): if qa_config.TestEnabled('instance-modify'):
RunTest(qa_instance.TestInstanceModify, instance) RunTest(qa_instance.TestInstanceModify, instance)
if qa_config.TestEnabled('instance-console'):
RunTest(qa_instance.TestInstanceConsole, instance)
if qa_config.TestEnabled('instance-reinstall'): if qa_config.TestEnabled('instance-reinstall'):
RunTest(qa_instance.TestInstanceShutdown, instance) RunTest(qa_instance.TestInstanceShutdown, instance)
RunTest(qa_instance.TestInstanceReinstall, instance) RunTest(qa_instance.TestInstanceReinstall, instance)
......
...@@ -64,6 +64,10 @@ tests: ...@@ -64,6 +64,10 @@ tests:
instance-automatic-restart: False instance-automatic-restart: False
instance-consecutive-failures: False instance-consecutive-failures: False
# This test might fail with certain hypervisor types, depending on whether
# they support the `gnt-instance console' command.
instance-console: False
# Make sure not to include the disk(s) required for Dom0 to be included in # Make sure not to include the disk(s) required for Dom0 to be included in
# the volume group used for instances. Otherwise the whole system may stop # the volume group used for instances. Otherwise the whole system may stop
# working until restarted. # working until restarted.
......
...@@ -184,6 +184,16 @@ def TestInstanceList(): ...@@ -184,6 +184,16 @@ def TestInstanceList():
utils.ShellQuoteArgs(cmd)).wait(), 0) utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-console')
def TestInstanceConsole(instance):
"""gnt-instance console"""
master = qa_config.GetMasterNode()
cmd = ['gnt-instance', 'console', '--show-cmd', instance['name']]
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('backup-export') @qa_utils.DefineHook('backup-export')
def TestInstanceExport(instance, node): def TestInstanceExport(instance, node):
"""gnt-backup export""" """gnt-backup export"""
......
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