From 71279aed4532091af3869ad5c5402cd923d4e5ac Mon Sep 17 00:00:00 2001 From: Uday Kurundwade Date: Tue, 17 Dec 2024 14:57:53 +0530 Subject: [PATCH] Adds custom config to verify dedup feature Signed-off-by: Uday Kurundwade --- ocs_ci/ocs/constants.py | 1 + tests/conftest.py | 2 +- tests/functional/object/mcg/test_write_to_bucket.py | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ocs_ci/ocs/constants.py b/ocs_ci/ocs/constants.py index a419766b34f..a24cdc8e797 100644 --- a/ocs_ci/ocs/constants.py +++ b/ocs_ci/ocs/constants.py @@ -149,6 +149,7 @@ STS_DEFAULT_SESSION_TOKEN_EXPIRY_MS = ( CONFIG_JS_PREFIX + "STS_DEFAULT_SESSION_TOKEN_EXPIRY_MS" ) +MIN_CHUNK_AGE_FOR_DEDUP = CONFIG_JS_PREFIX + "MIN_CHUNK_AGE_FOR_DEDUP" # Resources / Kinds CEPHFILESYSTEM = "CephFileSystem" diff --git a/tests/conftest.py b/tests/conftest.py index 8820bac797b..347850af640 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7441,7 +7441,7 @@ def finalizer(): @pytest.fixture(scope="class") def add_env_vars_to_noobaa_endpoint_class(request, mcg_obj_session): """ - Class-scoped fixture for adding env vars to the noobaa-core sts + Class-scoped fixture for adding env vars to the noobaa-endpoint sts """ return add_env_vars_to_noobaa_endpoint_fixture(request, mcg_obj_session) diff --git a/tests/functional/object/mcg/test_write_to_bucket.py b/tests/functional/object/mcg/test_write_to_bucket.py index 31ebbff159d..0e0663f9167 100644 --- a/tests/functional/object/mcg/test_write_to_bucket.py +++ b/tests/functional/object/mcg/test_write_to_bucket.py @@ -87,6 +87,14 @@ def teardown(): return zip_filename +@pytest.fixture(scope="class", autouse=True) +def reduce_dedup_wait_time(add_env_vars_to_noobaa_endpoint_class): + """ + Reduce the dedup time to 0 sec + """ + add_env_vars_to_noobaa_endpoint_class([(constants.MIN_CHUNK_AGE_FOR_DEDUP, 0)]) + + @mcg @red_squad @runs_on_provider