[#289] Move temp dir fixture to testlib #289
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
||||||
__version__ = "2.0.1"
|
__version__ = "2.0.1"
|
||||||
|
|
||||||
from .fixtures import configure_testlib, hosting
|
from .fixtures import configure_testlib, hosting, temp_directory
|
||||||
|
|
|
@ -7,7 +7,7 @@ import yaml
|
||||||
|
|
||||||
from frostfs_testlib import reporter
|
from frostfs_testlib import reporter
|
||||||
from frostfs_testlib.hosting.hosting import Hosting
|
from frostfs_testlib.hosting.hosting import Hosting
|
||||||
from frostfs_testlib.resources.common import HOSTING_CONFIG_FILE
|
from frostfs_testlib.resources.common import ASSETS_DIR, HOSTING_CONFIG_FILE
|
||||||
from frostfs_testlib.storage import get_service_registry
|
from frostfs_testlib.storage import get_service_registry
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,6 +24,16 @@ def configure_testlib():
|
||||||
registry.register_service(svc.name, svc.load())
|
registry.register_service(svc.name, svc.load())
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def temp_directory(configure_testlib):
|
||||||
|
with reporter.step("Prepare tmp directory"):
|
||||||
|
full_path = ASSETS_DIR
|
||||||
|
if not os.path.exists(full_path):
|
||||||
|
os.mkdir(full_path)
|
||||||
|
|
||||||
|
return full_path
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def hosting(configure_testlib) -> Hosting:
|
def hosting(configure_testlib) -> Hosting:
|
||||||
with open(HOSTING_CONFIG_FILE, "r") as file:
|
with open(HOSTING_CONFIG_FILE, "r") as file:
|
||||||
|
|
Loading…
Reference in a new issue