From 1f191fc5d459b53c43cdebca880b275e83f5aacb 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 23f9e1bc4db..99ab30d50fc 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 1dcbbe2fd78..0dfee9b2ff3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7361,7 +7361,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 1ac12950b0e..7c46c3653ae 100644 --- a/tests/functional/object/mcg/test_write_to_bucket.py +++ b/tests/functional/object/mcg/test_write_to_bucket.py @@ -88,6 +88,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