Skip to content

Commit

Permalink
Test reshard feature after bucket owner is changed
Browse files Browse the repository at this point in the history
Signed-off-by: Tejas Chandramouli <[email protected]>
  • Loading branch information
TejasC88 committed Nov 13, 2024
1 parent 2eeaa36 commit a42887c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
config:
objects_count: 50
objects_size_range:
min: 15
max: 20
sharding_type: manual
shards: 97
test_ops:
bucket_chown: True
14 changes: 14 additions & 0 deletions rgw/v2/tests/s3_swift/test_dynamic_bucket_resharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ def test_exec(config, ssh_con):
)
objects_created_list.append((s3_object_name, s3_object_path))

if config.test_ops.get("bucket_chown", False) is True:
log.info("Create new user and change bucket ownership")
new_user = s3lib.create_users(1)
new_user = new_user[0]
new_auth = Auth(new_user, ssh_con, ssl=config.ssl)
new_conn = new_auth.do_auth()
new_name = new_user["user_id"]
out = reusable.unlink_bucket(user_info["user_id"], bucket_name)
log.info("Bucket unlink successful")
out1 = reusable.link_chown_nontenant_to_nontenant(
new_user["user_id"], bucket_name
)
log.info(f"Bucket ownership changed to {new_name}")

if config.test_ops.get("verify_bucket_gen", False) is True:
bucket_gen_before = reusable.fetch_bucket_gen(bucket.name)
log.info(f"Current Bucket generation value is {bucket_gen_before}")
Expand Down

0 comments on commit a42887c

Please sign in to comment.