Commit 5d94ddf6 authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Thomas Thrainer
Browse files

QMP: test supported_commands

Add test for supported_commands.
Signed-off-by: default avatarApollon Oikonomopoulos <>
Signed-off-by: default avatarThomas Thrainer <>
Reviewed-by: default avatarThomas Thrainer <>
parent 8926b648
......@@ -39,6 +39,7 @@ from ganeti import pathutils
from ganeti.hypervisor import hv_kvm
import ganeti.hypervisor.hv_kvm.netdev as netdev
import ganeti.hypervisor.hv_kvm.monitor as monitor
import testutils
......@@ -63,6 +64,15 @@ class QmpStub(threading.Thread):
"return": [],
"return": [
{"name": "command"},
{"name": "query-kvm"},
{"name": "eject"},
{"name": "query-status"},
{"name": "query-name"},
def __init__(self, socket_filename, server_responses):
"""Creates a QMP stub
......@@ -94,6 +104,10 @@ class QmpStub(threading.Thread):
# Expect query-commands and return the list of supported commands
while True:
# We ignore the expected message, as the purpose of this object is not
# to verify the correctness of the communication but to act as a
......@@ -199,6 +213,10 @@ class TestQmp(testutils.GanetiTestCase):
msg="Got multi-line message")
self.assertEqual(response, msg)
class TestConsole(unittest.TestCase):
def _Test(self, instance, node, group, hvparams):
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