mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-23 01:08:54 +00:00
When you change settings of the GNS3 VM the VM is reloaded and project using it closed
Fix #644
This commit is contained in:
@ -37,3 +37,16 @@ def test_list(async_run, controller):
|
||||
def test_json(controller):
|
||||
vm = GNS3VM(controller)
|
||||
assert vm.__json__() == vm._settings
|
||||
|
||||
|
||||
def test_update_settings(controller, async_run):
|
||||
vm = GNS3VM(controller)
|
||||
vm.settings = {
|
||||
"enable": True,
|
||||
"engine": "vmware"
|
||||
}
|
||||
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.start"):
|
||||
async_run(vm.auto_start_vm())
|
||||
assert "vm" in controller.computes
|
||||
async_run(vm.update_settings({"enable": False}))
|
||||
assert "vm" not in controller.computes
|
||||
|
Reference in New Issue
Block a user