Commit 4379b1fa authored by Michael Hanselmann's avatar Michael Hanselmann

Add QA test for “gnt-instance console”

Reviewed-by: iustinp
parent 51c6e7b5
......@@ -143,6 +143,9 @@ def RunCommonInstanceTests(instance):
if qa_config.TestEnabled('instance-modify'):
RunTest(qa_instance.TestInstanceModify, instance)
if qa_config.TestEnabled('instance-console'):
RunTest(qa_instance.TestInstanceConsole, instance)
if qa_config.TestEnabled('instance-reinstall'):
RunTest(qa_instance.TestInstanceShutdown, instance)
RunTest(qa_instance.TestInstanceReinstall, instance)
......
......@@ -64,6 +64,10 @@ tests:
instance-automatic-restart: 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
# the volume group used for instances. Otherwise the whole system may stop
# working until restarted.
......
......@@ -184,6 +184,16 @@ def TestInstanceList():
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')
def TestInstanceExport(instance, node):
"""gnt-backup export"""
......
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