Rename NVRAM to the correct application id before start the server

This commit is contained in:
Julien Duponchelle committed 2015-02-13 20:57:20 +01:00
1 parent a9a3bb1c38
commit 83edc649d2
2 files changed
+26 -2

No files matched your search

+12
View File
@@ -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()