Merge branch '2.1' into 2.2

# Conflicts:
#	gns3server/version.py
#	requirements.txt
This commit is contained in:
grossmj committed 2018-01-23 12:47:13 +07:00
commit 28f8216590
304 files changed
+5513 -1165

No files matched your search

+4 -3
View File
@@ -388,9 +388,10 @@ def test_start_vm(controller, async_run):
"vmname": "GNS3 VM"
}
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.start") as mock:
with asyncio_patch("gns3server.controller.compute.Compute.connect") as mock_connect:
async_run(controller.start())
assert mock.called
with asyncio_patch("gns3server.controller.gns3vm.GNS3VM._check_network") as mock_check_network:
with asyncio_patch("gns3server.controller.compute.Compute.connect") as mock_connect:
async_run(controller.start())
assert mock.called
assert "local" in controller.computes
assert "vm" in controller.computes
assert len(controller.computes) == 2 # Local compute and vm are created
+5 -2
View File
@@ -70,7 +70,8 @@ def test_update_settings(controller, async_run):
"vmname": "GNS3 VM"
}
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.start"):
async_run(vm.auto_start_vm())
with asyncio_patch("gns3server.controller.gns3vm.GNS3VM._check_network") as mock_check_network:
async_run(vm.auto_start_vm())
assert "vm" in controller.computes
async_run(vm.update_settings({"enable": False}))
assert "vm" not in controller.computes
@@ -80,7 +81,9 @@ def test_auto_start(async_run, controller, dummy_gns3vm, dummy_engine):
"""
When start the compute should be add to the controller
"""
async_run(dummy_gns3vm.auto_start_vm())
with asyncio_patch("gns3server.controller.gns3vm.GNS3VM._check_network") as mock_check_network:
async_run(dummy_gns3vm.auto_start_vm())
assert dummy_engine.start.called
assert controller.computes["vm"].name == "GNS3 VM (Test VM)"
assert controller.computes["vm"].host == "vm.local"
+3 -3
View File
@@ -195,7 +195,7 @@ def test_create(node, compute, project, async_run):
"startup_script": "echo test",
"name": "demo"
}
compute.post.assert_called_with("/projects/{}/vpcs/nodes".format(node.project.id), data=data, timeout=120)
compute.post.assert_called_with("/projects/{}/vpcs/nodes".format(node.project.id), data=data, timeout=1200)
assert node._console == 2048
assert node._properties == {"startup_script": "echo test"}
@@ -244,7 +244,7 @@ def test_create_base_script(node, config, compute, tmpdir, async_run):
"startup_script": "hostname test",
"name": "demo"
}
compute.post.assert_called_with("/projects/{}/vpcs/nodes".format(node.project.id), data=data, timeout=120)
compute.post.assert_called_with("/projects/{}/vpcs/nodes".format(node.project.id), data=data, timeout=1200)
def test_symbol(node, symbols_dir):
@@ -445,7 +445,7 @@ def test_create_without_console(node, compute, project, async_run):
"startup_script": "echo test",
"name": "demo"
}
compute.post.assert_called_with("/projects/{}/vpcs/nodes".format(node.project.id), data=data, timeout=120)
compute.post.assert_called_with("/projects/{}/vpcs/nodes".format(node.project.id), data=data, timeout=1200)
assert node._console == 2048
assert node._properties == {"test_value": "success", "startup_script": "echo test"}
+4 -4
View File
@@ -153,7 +153,7 @@ def test_add_node_local(async_run, controller):
data={'node_id': node.id,
'startup_script': 'test.cfg',
'name': 'test'},
timeout=120)
timeout=1200)
assert compute in project._project_created_on_compute
controller.notification.emit.assert_any_call("node.created", node.__json__())
@@ -181,7 +181,7 @@ def test_add_node_non_local(async_run, controller):
data={'node_id': node.id,
'startup_script': 'test.cfg',
'name': 'test'},
timeout=120)
timeout=1200)
assert compute in project._project_created_on_compute
controller.notification.emit.assert_any_call("node.created", node.__json__())
@@ -222,7 +222,7 @@ def test_add_node_from_appliance(async_run, controller):
'name': 'Test-1',
'a': 1,
},
timeout=120)
timeout=1200)
assert compute in project._project_created_on_compute
controller.notification.emit.assert_any_call("node.created", node.__json__())
@@ -233,7 +233,7 @@ def test_add_node_from_appliance(async_run, controller):
'name': 'Test-2',
'a': 1
},
timeout=120)
timeout=1200)
def test_delete_node(async_run, controller):