Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Mahesh Shetty <[email protected]>
  • Loading branch information
mashetty330 committed Feb 26, 2024
1 parent 569078b commit 1ef941e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
9 changes: 1 addition & 8 deletions ocs_ci/ocs/bucket_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions ocs_ci/ocs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1ef941e

Please sign in to comment.