This goes a bit further than the other tests, and does a basic (read
only) interaction with the VNC protocol.
This is not a enough to perform a handshake, but enough to make sure
that the socket is somewhat operational and that the expected initial
step of the handshake is performed by the server and that the version
matches.
Signed-off-by: Cleber Rosa <address@hidden>
---
tests/acceptance/vnc.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
index d32ae46685..b000446d7c 100644
--- a/tests/acceptance/vnc.py
+++ b/tests/acceptance/vnc.py
@@ -11,6 +11,7 @@
import os
import tempfile
import shutil
+import socket
from avocado_qemu import Test
@@ -71,5 +72,16 @@ class VncUnixSocket(Test):
arg='new_password')
self.assertEqual(set_password_response['return'], {})
+ def test_protocol_version(self):
+ self.vm.add_args('-nodefaults', '-S',
+ '-vnc', 'unix:%s' % self.socket_path)
+ self.vm.launch()
+ self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])