mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-22 05:55:14 +02:00
Raise error if using a non linked clone VM twice
Fix https://github.com/GNS3/gns3-gui/issues/1593
This commit is contained in:
20 files changed
+100
-54
No files matched your search
+4
-4
@@ -82,9 +82,6 @@ def http_server(request, loop, port_manager, monkeypatch, controller):
|
||||
app = web.Application()
|
||||
for method, route, handler in Route.get_routes():
|
||||
app.router.add_route(method, route, handler)
|
||||
for module in MODULES:
|
||||
instance = module.instance()
|
||||
instance.port_manager = port_manager
|
||||
|
||||
host = "localhost"
|
||||
|
||||
@@ -145,7 +142,7 @@ def project(tmpdir):
|
||||
return p
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
@pytest.fixture(scope="function")
|
||||
def port_manager():
|
||||
"""An instance of port manager"""
|
||||
|
||||
@@ -198,6 +195,9 @@ def run_around_tests(monkeypatch, port_manager, controller, config):
|
||||
|
||||
tmppath = tempfile.mkdtemp()
|
||||
|
||||
for module in MODULES:
|
||||
module._instance = None
|
||||
|
||||
port_manager._instance = port_manager
|
||||
os.makedirs(os.path.join(tmppath, 'projects'))
|
||||
config.set("Server", "projects_path", os.path.join(tmppath, 'projects'))
|
||||
|
||||
Reference in new issue
Block a user