mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Rename NVRAM to the correct application id before start the server
This commit is contained in:
1 parent
a9a3bb1c38
commit
83edc649d2
2 files changed
+26
-2
No files matched your search
@@ -85,6 +85,18 @@ def test_start(loop, vm, monkeypatch):
|
||||
assert vm.is_running()
|
||||
|
||||
|
||||
def test_rename_nvram_file(loop, vm, monkeypatch):
|
||||
"""
|
||||
It should rename the nvram file to the correct name before launching the VM
|
||||
"""
|
||||
|
||||
with open(os.path.join(vm.working_dir, "nvram_0000{}".format(vm.application_id + 1)), 'w+') as f:
|
||||
f.write("1")
|
||||
|
||||
vm._rename_nvram_file()
|
||||
assert os.path.exists(os.path.join(vm.working_dir, "nvram_0000{}".format(vm.application_id)))
|
||||
|
||||
|
||||
def test_stop(loop, vm):
|
||||
process = MagicMock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user