mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Merge branch '2.2' into 3.0
# Conflicts: # gns3server/controller/__init__.py # gns3server/crash_report.py # gns3server/static/web-ui/index.html # gns3server/static/web-ui/main.96be36058f5df0ca7e7f.js # gns3server/utils/images.py # gns3server/version.py # requirements.txt # tests/compute/docker/test_docker_vm.py # tests/controller/test_controller.py
This commit is contained in:
commit
b3dfb87622
46 files changed
+2155
-93
No files matched your search
@@ -264,6 +264,21 @@ async def test_create_with_extra_hosts(compute_project, manager):
|
||||
assert "GNS3_EXTRA_HOSTS=199.199.199.1\ttest\n199.199.199.1\ttest2" in called_kwargs["data"]["Env"]
|
||||
assert vm._extra_hosts == extra_hosts
|
||||
|
||||
@pytest.mark.asyncio
|
||||
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()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_with_extra_hosts_wrong_format(compute_project, manager):
|
||||
|
||||
Reference in new issue
Block a user