From 7d0fa79fb231e3fc3f071c54f30e901a4155ba34 Mon Sep 17 00:00:00 2001 From: "a.berezin" Date: Tue, 10 Sep 2024 15:14:32 +0300 Subject: [PATCH] [#300] Move temp dir fixture to testlib Signed-off-by: a.berezin --- pytest_tests/testsuites/conftest.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pytest_tests/testsuites/conftest.py b/pytest_tests/testsuites/conftest.py index 131bbfc..3d423d1 100644 --- a/pytest_tests/testsuites/conftest.py +++ b/pytest_tests/testsuites/conftest.py @@ -15,7 +15,7 @@ from frostfs_testlib.credentials.interfaces import CredentialsProvider, User from frostfs_testlib.healthcheck.interfaces import Healthcheck from frostfs_testlib.hosting import Hosting 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.interfaces import BucketContainerResolver 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) -@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") @pytest.fixture(scope="session", autouse=True) def session_start_time(configure_testlib):