From 1b86d4c13d5e9aeeee89936817aa915f66de216a Mon Sep 17 00:00:00 2001 From: udaysk23 <54358025+udaysk23@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:23:26 +0530 Subject: [PATCH] Adds custom config to verify dedup feature (#11055) 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 74dde9a3d02..2d0c3fcd138 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 12c5860851b..8c5ee6dbea4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7601,7 +7601,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