Skip to content

Commit 56d3a14

Browse files
committed
tests/functional/test_vnc: Do not use a hard-coded VNC port
Two tests here are using the hard-coded VNC port :0 ... if there is already a QEMU or other program running that is using this port, the tests will be failing. Fortunately, QEMU can also auto-detect a free port with the "to=..." parameter, so let's use that for the tests to avoid the problem. Message-ID: <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent c82bfaf commit 56d3a14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/functional/test_vnc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_no_vnc_change_password(self):
7272
'Could not set password')
7373

7474
def test_change_password_requires_a_password(self):
75-
self.vm.add_args('-nodefaults', '-S', '-vnc', ':0')
75+
self.vm.add_args('-nodefaults', '-S', '-vnc', ':1,to=999')
7676
self.vm.launch()
7777
self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])
7878
set_password_response = self.vm.qmp('change-vnc-password',
@@ -84,7 +84,7 @@ def test_change_password_requires_a_password(self):
8484
'Could not set password')
8585

8686
def test_change_password(self):
87-
self.vm.add_args('-nodefaults', '-S', '-vnc', ':0,password=on')
87+
self.vm.add_args('-nodefaults', '-S', '-vnc', ':1,to=999,password=on')
8888
self.vm.launch()
8989
self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])
9090
self.vm.cmd('change-vnc-password',

0 commit comments

Comments
 (0)