Fix test suite after VPCS changes for using ubridge

This commit is contained in:
Julien Duponchelle committed 2016-06-23 12:10:18 +02:00
1 parent 852d8e411e
commit 4c3bfde97e
6 files changed
+25 -15

No files matched your search

+12
View File
@@ -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():
"""