mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 20:55:14 +02:00
refactor: remove platform-specific code for Darwin and Windows. Clean up Qemu options handling
This commit is contained in:
20 files changed
+77
-532
No files matched your search
@@ -33,27 +33,3 @@ async def gns3vm(controller):
|
||||
def vmx_path(tmpdir):
|
||||
|
||||
return str(tmpdir / "vmwware_vm.vmx")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_set_extra_options(gns3vm, vmx_path, windows_platform):
|
||||
|
||||
gns3vm._vmx_path = vmx_path
|
||||
|
||||
# when there is not an entry, we modify it
|
||||
with open(vmx_path, "w") as f:
|
||||
f.write("")
|
||||
|
||||
await gns3vm._set_extra_options()
|
||||
|
||||
with open(vmx_path) as f:
|
||||
assert f.read() == 'vhv.enable = "TRUE"\n'
|
||||
|
||||
# when there is an entry, we don't modify it
|
||||
with open(vmx_path, "w") as f:
|
||||
f.write('vhv.enable = "FALSE"\n')
|
||||
|
||||
await gns3vm._set_extra_options()
|
||||
|
||||
with open(vmx_path) as f:
|
||||
assert f.read() == 'vhv.enable = "FALSE"\n'
|
||||
Reference in new issue
Block a user