mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 04:35:14 +02:00
1 parent
4f1b738ef5
commit
9dc6f0f486
11 files changed
+432
-27
No files matched your search
@@ -53,7 +53,7 @@ def test_load_controller_settings(controller, controller_config_path, async_run)
|
||||
"compute_id": "test1"
|
||||
}
|
||||
]
|
||||
data["settings"] = {"IOU": True}
|
||||
data["settings"] = {"IOU": {"test": True}}
|
||||
data["gns3vm"] = {"vmname": "Test VM"}
|
||||
with open(controller_config_path, "w+") as f:
|
||||
json.dump(data, f)
|
||||
@@ -468,3 +468,23 @@ def test_load_base_files(controller, config, tmpdir):
|
||||
# Check is the file has not been overwrite
|
||||
with open(str(tmpdir / 'iou_l2_base_startup-config.txt')) as f:
|
||||
assert f.read() == 'test'
|
||||
|
||||
|
||||
def test_appliance_templates(controller, async_run):
|
||||
controller.load_appliances()
|
||||
assert len(controller.appliance_templates) > 0
|
||||
|
||||
|
||||
def test_load_appliances(controller):
|
||||
controller._settings = {
|
||||
"Qemu": {
|
||||
"vms": [
|
||||
{
|
||||
"name": "Test"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
controller.load_appliances()
|
||||
assert "Test" in [appliance.name for appliance in controller.appliances.values()]
|
||||
assert "Cloud" in [appliance.name for appliance in controller.appliances.values()]
|
||||
Reference in new issue
Block a user