mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Avoid crash during tests if VNC server run on host PC
This commit is contained in:
parent
19d184e04c
commit
00fc2fa007
@ -566,8 +566,8 @@ def test_update_vnc(loop, vm):
|
||||
"Warnings": []
|
||||
}
|
||||
|
||||
vm.console_type = "vnc"
|
||||
vm.console = 5900
|
||||
vm._console_type = "vnc"
|
||||
vm._console = 5900
|
||||
vm._display = "display"
|
||||
original_console = vm.console
|
||||
original_aux = vm.aux
|
||||
@ -872,6 +872,7 @@ def test_get_image_informations(project, manager, loop):
|
||||
loop.run_until_complete(asyncio.async(vm._get_image_information()))
|
||||
mock.assert_called_with("GET", "images/ubuntu:latest/json")
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
|
||||
def test_mount_binds(vm, tmpdir):
|
||||
image_infos = {
|
||||
@ -930,6 +931,7 @@ def test_create_network_interfaces(vm):
|
||||
assert "eth4" in content
|
||||
assert "eth5" not in content
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
|
||||
def test_fix_permission(vm, loop):
|
||||
vm._volumes = ["/etc"]
|
||||
|
@ -68,7 +68,7 @@ def test_change_console_port(node, port_manager):
|
||||
|
||||
def test_console_vnc_invalid(project, manager):
|
||||
node = VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", project, manager)
|
||||
node.console_type = "vnc"
|
||||
node._console_type = "vnc"
|
||||
with pytest.raises(NodeError):
|
||||
node.console = 2012
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user