diff --git a/ocs_ci/ocs/bucket_utils.py b/ocs_ci/ocs/bucket_utils.py index f7ffe398fe53..172057a2c755 100644 --- a/ocs_ci/ocs/bucket_utils.py +++ b/ocs_ci/ocs/bucket_utils.py @@ -2342,6 +2342,7 @@ def sample_if_objects_expired(mcg_obj, bucket_name, prefix="", timeout=600, slee assert sampler.wait_for_func_status(result=True), f"{message} are not expired" logger.info(f"{message} are expired") + def delete_all_noobaa_buckets(mcg_obj, request): """ Deletes all the buckets in noobaa and restores the first.bucket after the current test @@ -2634,10 +2635,6 @@ def upload_test_objects_to_source_and_wait_for_replication( logger.info("Uploading test objects and waiting for replication to complete") mockup_logger.upload_test_objs_and_log(source_bucket.name) - logger.info( - "Resetting the noobaa-core pod to trigger the replication background worker" - ) - assert compare_bucket_object_list( mcg_obj, source_bucket.name, @@ -2656,10 +2653,6 @@ def delete_objects_from_source_and_wait_for_deletion_sync( logger.info("Deleting source objects and waiting for deletion sync with target") mockup_logger.delete_all_objects_and_log(source_bucket.name) - logger.info( - "Resetting the noobaa-core pod to trigger the replication background worker" - ) - assert compare_bucket_object_list( mcg_obj, source_bucket.name, diff --git a/ocs_ci/ocs/constants.py b/ocs_ci/ocs/constants.py index 5ad867e291b4..aae67d07c290 100644 --- a/ocs_ci/ocs/constants.py +++ b/ocs_ci/ocs/constants.py @@ -284,6 +284,7 @@ DEFAULT_NOOBAA_BACKINGSTORE = "noobaa-default-backing-store" DEFAULT_NOOBAA_BUCKETCLASS = "noobaa-default-bucket-class" NOOBAA_RESOURCE_NAME = "noobaa" +NOOBAA_DB_PVC_NAME = "db-noobaa-db-pg-0" MIN_PV_BACKINGSTORE_SIZE_IN_GB = 17 JENKINS_BUILD = "jax-rs-build" JENKINS_BUILD_COMPLETE = "Complete" diff --git a/tests/conftest.py b/tests/conftest.py index 634a24628e68..a8d9c730f804 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7369,7 +7369,7 @@ def factory(new_delay_in_miliseconds=60 * 1000): @pytest.fixture() -def log_based_replication_setup( +def aws_log_based_replication_setup( awscli_pod_session, mcg_obj_session, bucket_factory, reduce_replication_delay_setup ): """ diff --git a/tests/cross_functional/system_test/test_mcg_replication_with_disruptions.py b/tests/cross_functional/system_test/test_mcg_replication_with_disruptions.py index 3e79dc98d9ae..0d3738095cb4 100644 --- a/tests/cross_functional/system_test/test_mcg_replication_with_disruptions.py +++ b/tests/cross_functional/system_test/test_mcg_replication_with_disruptions.py @@ -5,6 +5,7 @@ import time from concurrent.futures import ThreadPoolExecutor +from ocs_ci.ocs import constants from ocs_ci.framework.testlib import ( E2ETest, skipif_ocs_version, @@ -248,7 +249,7 @@ class TestLogBasedReplicationWithDisruptions: def test_log_based_replication_with_disruptions( self, mcg_obj_session, - log_based_replication_setup, + aws_log_based_replication_setup, noobaa_db_backup, noobaa_db_recovery_from_backup, setup_mcg_bg_features, @@ -281,10 +282,10 @@ def test_log_based_replication_with_disruptions( num_of_buckets=5, object_amount=5, is_disruptive=True, - skip_any_features=["nsfs", "rgw kafka", "caching"], + skip_any_features=["nsfs", "rgw kafka", "caching", "replication"], ) - mockup_logger, source_bucket, target_bucket = log_based_replication_setup() + mockup_logger, source_bucket, target_bucket = aws_log_based_replication_setup() # upload test objects to the bucket and verify replication upload_test_objects_to_source_and_wait_for_replication( @@ -334,7 +335,7 @@ def delete_objs_in_batch(): noobaa_pods = get_noobaa_pods() # Get noobaa PVC before execution - noobaa_pvc_obj = get_pvc_objs(pvc_names=["db-noobaa-db-pg-0"]) + noobaa_pvc_obj = get_pvc_objs(pvc_names=[constants.NOOBAA_DB_PVC_NAME]) _, snap_obj = noobaa_db_backup(noobaa_pvc_obj) @@ -376,7 +377,7 @@ def delete_objs_in_batch(): source_bucket.name, target_bucket.name, timeout=600, - ), f"Standard replication completed even though replication policy is removed" + ), "Standard replication completed even though replication policy is removed" validate_mcg_bg_features( feature_setup_map,