mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge remote-tracking branch 'origin/master' into 2.1
This commit is contained in:
16 files changed
+95
-13
No files matched your search
@@ -62,6 +62,16 @@ def test_load_controller_settings(controller, controller_config_path, async_run)
|
||||
assert controller.gns3vm.settings["vmname"] == "Test VM"
|
||||
|
||||
|
||||
def test_load_controller_settings_with_no_computes_section(controller, controller_config_path, async_run):
|
||||
controller.save()
|
||||
with open(controller_config_path) as f:
|
||||
data = json.load(f)
|
||||
del data['computes']
|
||||
with open(controller_config_path, "w+") as f:
|
||||
json.dump(data, f)
|
||||
assert len(async_run(controller._load_controller_settings())) == 0
|
||||
|
||||
|
||||
def test_import_computes_1_x(controller, controller_config_path, async_run):
|
||||
"""
|
||||
At first start the server should import the
|
||||
|
||||
@@ -473,6 +473,15 @@ def test_duplicate(project, async_run, controller):
|
||||
assert list(new_project.nodes.values())[1].compute.id == "remote"
|
||||
|
||||
|
||||
def test_duplicate_with_zipfile_encoding_issues(project, async_run, controller):
|
||||
zf = zipstream.ZipFile()
|
||||
zf.writestr('test\udcc3', "data")
|
||||
|
||||
with asyncio_patch('gns3server.controller.project.export_project', return_value=zf):
|
||||
with pytest.raises(aiohttp.web.HTTPConflict):
|
||||
async_run(project.duplicate(name="Hello"))
|
||||
|
||||
|
||||
def test_snapshots(project):
|
||||
"""
|
||||
List the snapshots
|
||||
|
||||
Reference in new issue
Block a user