mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Sub directory project-files
This commit is contained in:
parent
e99c0f6ac5
commit
b31af0abcd
@ -170,7 +170,7 @@ class Project:
|
||||
:returns: A string with a VM working directory
|
||||
"""
|
||||
|
||||
workdir = os.path.join(self._path, vm.manager.module_name.lower(), vm.id)
|
||||
workdir = os.path.join(self._path, 'project-files', vm.manager.module_name.lower(), vm.id)
|
||||
try:
|
||||
os.makedirs(workdir, exist_ok=True)
|
||||
except OSError as e:
|
||||
|
@ -115,8 +115,8 @@ def test_json(tmpdir):
|
||||
def test_vm_working_directory(tmpdir, vm):
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={"local": True}):
|
||||
p = Project(location=str(tmpdir))
|
||||
assert p.vm_working_directory(vm) == os.path.join(str(tmpdir), p.id, 'project-files', vm.module_name, vm.id)
|
||||
assert os.path.exists(p.vm_working_directory(vm))
|
||||
assert os.path.exists(os.path.join(str(tmpdir), p.id, vm.module_name, vm.id))
|
||||
|
||||
|
||||
def test_mark_vm_for_destruction(vm):
|
||||
|
Loading…
Reference in New Issue
Block a user