forked from TrueCloudLab/frostfs-testcases
[#300] Move temp dir fixture to testlib
Signed-off-by: a.berezin <a.berezin@yadro.com>
This commit is contained in:
parent
64c70948f9
commit
7d0fa79fb2
1 changed files with 1 additions and 15 deletions
|
@ -15,7 +15,7 @@ from frostfs_testlib.credentials.interfaces import CredentialsProvider, User
|
||||||
from frostfs_testlib.healthcheck.interfaces import Healthcheck
|
from frostfs_testlib.healthcheck.interfaces import Healthcheck
|
||||||
from frostfs_testlib.hosting import Hosting
|
from frostfs_testlib.hosting import Hosting
|
||||||
from frostfs_testlib.resources import optionals
|
from frostfs_testlib.resources import optionals
|
||||||
from frostfs_testlib.resources.common import ASSETS_DIR, COMPLEX_OBJECT_CHUNKS_COUNT, COMPLEX_OBJECT_TAIL_SIZE, SIMPLE_OBJECT_SIZE
|
from frostfs_testlib.resources.common import COMPLEX_OBJECT_CHUNKS_COUNT, COMPLEX_OBJECT_TAIL_SIZE, SIMPLE_OBJECT_SIZE
|
||||||
from frostfs_testlib.s3 import AwsCliClient, Boto3ClientWrapper, S3ClientWrapper, VersioningStatus
|
from frostfs_testlib.s3 import AwsCliClient, Boto3ClientWrapper, S3ClientWrapper, VersioningStatus
|
||||||
from frostfs_testlib.s3.interfaces import BucketContainerResolver
|
from frostfs_testlib.s3.interfaces import BucketContainerResolver
|
||||||
from frostfs_testlib.shell import LocalShell, Shell
|
from frostfs_testlib.shell import LocalShell, Shell
|
||||||
|
@ -379,20 +379,6 @@ def collect_binary_versions(hosting: Hosting, client_shell: Shell, request: pyte
|
||||||
env_utils.save_env_properties(file_path, all_versions)
|
env_utils.save_env_properties(file_path, all_versions)
|
||||||
|
|
||||||
|
|
||||||
@reporter.step("Prepare tmp directory")
|
|
||||||
@pytest.fixture(scope="session")
|
|
||||||
def temp_directory(configure_testlib):
|
|
||||||
with reporter.step("Prepare tmp directory"):
|
|
||||||
full_path = os.path.join(os.getcwd(), ASSETS_DIR)
|
|
||||||
shutil.rmtree(full_path, ignore_errors=True)
|
|
||||||
os.mkdir(full_path)
|
|
||||||
|
|
||||||
yield full_path
|
|
||||||
|
|
||||||
with reporter.step("Remove tmp directory"):
|
|
||||||
shutil.rmtree(full_path)
|
|
||||||
|
|
||||||
|
|
||||||
@reporter.step("[Autouse/Session] Test session start time")
|
@reporter.step("[Autouse/Session] Test session start time")
|
||||||
@pytest.fixture(scope="session", autouse=True)
|
@pytest.fixture(scope="session", autouse=True)
|
||||||
def session_start_time(configure_testlib):
|
def session_start_time(configure_testlib):
|
||||||
|
|
Loading…
Reference in a new issue