mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-22 09:29:43 +00:00
s3tests: basic test to copy object between regions
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
parent
5f4910fad5
commit
04d46c59f0
1 changed files with 28 additions and 1 deletions
|
@ -4541,7 +4541,7 @@ def assert_can_test_multiregion():
|
||||||
@attr(operation='create on one region, access in another')
|
@attr(operation='create on one region, access in another')
|
||||||
@attr(assertion='can\'t access in other region')
|
@attr(assertion='can\'t access in other region')
|
||||||
@attr('multiregion')
|
@attr('multiregion')
|
||||||
def test_region_bucket_create_secondary_access_master():
|
def test_region_bucket_create_secondary_access_remove_master():
|
||||||
assert_can_test_multiregion()
|
assert_can_test_multiregion()
|
||||||
|
|
||||||
master_conn = targets.main.master.connection
|
master_conn = targets.main.master.connection
|
||||||
|
@ -4558,3 +4558,30 @@ def test_region_bucket_create_secondary_access_master():
|
||||||
|
|
||||||
|
|
||||||
conn.delete_bucket(bucket)
|
conn.delete_bucket(bucket)
|
||||||
|
|
||||||
|
@attr(resource='object')
|
||||||
|
@attr(method='copy')
|
||||||
|
@attr(operation='cread object in one region, read in another')
|
||||||
|
@attr(assertion='can read object')
|
||||||
|
@attr('multiregion')
|
||||||
|
def test_region_copy_object():
|
||||||
|
assert_can_test_multiregion()
|
||||||
|
|
||||||
|
master = targets.main.master
|
||||||
|
|
||||||
|
master_conn = master.connection
|
||||||
|
|
||||||
|
master_bucket = get_new_bucket(master)
|
||||||
|
for r in targets.main.secondaries:
|
||||||
|
conn = r.connection
|
||||||
|
bucket = get_new_bucket(r)
|
||||||
|
|
||||||
|
content = 'testcontent'
|
||||||
|
|
||||||
|
key = bucket.new_key('testobj')
|
||||||
|
key.set_contents_from_string(content)
|
||||||
|
|
||||||
|
master_bucket.copy_key('testobj-dest', bucket.name, key.name)
|
||||||
|
|
||||||
|
bucket.delete_key(key.name)
|
||||||
|
conn.delete_bucket(bucket)
|
||||||
|
|
Loading…
Reference in a new issue