mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-23 14:24:34 +02:00
Fix test suite after VPCS changes for using ubridge
This commit is contained in:
6 files changed
+25
-15
No files matched your search
@@ -205,6 +205,7 @@ def run_around_tests(monkeypatch, port_manager, controller, config):
|
||||
os.makedirs(os.path.join(tmppath, 'projects'))
|
||||
config.set("Server", "projects_path", os.path.join(tmppath, 'projects'))
|
||||
config.set("Server", "images_path", os.path.join(tmppath, 'images'))
|
||||
config.set("Server", "ubridge_path", os.path.join(tmppath, 'bin', 'ubridge'))
|
||||
config.set("Server", "auth", False)
|
||||
config.set("Server", "controller", True)
|
||||
|
||||
@@ -252,6 +253,17 @@ def projects_dir(config):
|
||||
return path
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def ubridge_path(config):
|
||||
"""
|
||||
Get the location of a fake ubridge
|
||||
"""
|
||||
path = config.get_section_config("Server").get("ubridge_path")
|
||||
os.makedirs(os.path.dirname(path), exist_ok=True)
|
||||
open(path, 'w+').close()
|
||||
return path
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def darwin_platform():
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user