mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Check for colon in project name. Fixes #2203
This commit is contained in:
1 parent
ceb8208002
commit
f08ce9d3f1
2 files changed
+18
No files matched your search
@@ -222,6 +222,21 @@ async def test_create_with_extra_hosts(compute_project, manager):
|
||||
assert vm._extra_hosts == extra_hosts
|
||||
|
||||
|
||||
async def test_create_with_colon_in_project_name(compute_project, manager):
|
||||
|
||||
response = {
|
||||
"Id": "e90e34656806",
|
||||
"Warnings": []
|
||||
}
|
||||
|
||||
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]):
|
||||
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response):
|
||||
with patch("gns3server.compute.project.Project.node_working_directory", return_value="/tmp/test_:_/"):
|
||||
vm = DockerVM("test", str(uuid.uuid4()), compute_project, manager, "ubuntu")
|
||||
with pytest.raises(DockerError):
|
||||
await vm.create()
|
||||
|
||||
|
||||
async def test_create_with_extra_hosts_wrong_format(compute_project, manager):
|
||||
extra_hosts = "test"
|
||||
|
||||
|
||||
Reference in new issue
Block a user