mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-14 13:28:12 +00:00
Merge branch '2.0' into 2.1
This commit is contained in:
@ -42,7 +42,7 @@ def test_save(controller, controller_config_path):
|
||||
assert data["gns3vm"] == controller.gns3vm.__json__()
|
||||
|
||||
|
||||
def test_load(controller, controller_config_path, async_run):
|
||||
def test_load_controller_settings(controller, controller_config_path, async_run):
|
||||
controller.save()
|
||||
with open(controller_config_path) as f:
|
||||
data = json.load(f)
|
||||
@ -60,7 +60,7 @@ def test_load(controller, controller_config_path, async_run):
|
||||
data["gns3vm"] = {"vmname": "Test VM"}
|
||||
with open(controller_config_path, "w+") as f:
|
||||
json.dump(data, f)
|
||||
async_run(controller.load())
|
||||
async_run(controller._load_controller_settings())
|
||||
assert controller.settings["IOU"]
|
||||
assert controller.computes["test1"].__json__() == {
|
||||
"compute_id": "test1",
|
||||
@ -104,7 +104,7 @@ def test_import_computes_1_x(controller, controller_config_path, async_run):
|
||||
with open(os.path.join(config_dir, "gns3_gui.conf"), "w+") as f:
|
||||
json.dump(gns3_gui_conf, f)
|
||||
|
||||
async_run(controller.load())
|
||||
async_run(controller._load_controller_settings())
|
||||
for compute in controller.computes.values():
|
||||
if compute.id != "local":
|
||||
assert len(compute.id) == 36
|
||||
@ -146,7 +146,7 @@ def test_import_gns3vm_1_x(controller, controller_config_path, async_run):
|
||||
json.dump(gns3_gui_conf, f)
|
||||
|
||||
controller.gns3vm.settings["engine"] = None
|
||||
async_run(controller.load())
|
||||
async_run(controller._load_controller_settings())
|
||||
assert controller.gns3vm.settings["engine"] == "vmware"
|
||||
assert controller.gns3vm.settings["enable"]
|
||||
assert controller.gns3vm.settings["headless"]
|
||||
@ -202,7 +202,7 @@ def test_import_remote_gns3vm_1_x(controller, controller_config_path, async_run)
|
||||
json.dump(gns3_gui_conf, f)
|
||||
|
||||
with asyncio_patch("gns3server.controller.compute.Compute.connect"):
|
||||
async_run(controller.load())
|
||||
async_run(controller._load_controller_settings())
|
||||
assert controller.gns3vm.settings["engine"] == "remote"
|
||||
assert controller.gns3vm.settings["vmname"] == "http://127.0.0.1:3081"
|
||||
|
||||
|
Reference in New Issue
Block a user