s3tests: basic test to copy object between regions

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2013-07-26 18:07:52 -07:00
parent 5f4910fad5
commit 04d46c59f0

View file

@ -4541,7 +4541,7 @@ def assert_can_test_multiregion():
@attr(operation='create on one region, access in another')
@attr(assertion='can\'t access in other region')
@attr('multiregion')
def test_region_bucket_create_secondary_access_master():
def test_region_bucket_create_secondary_access_remove_master():
assert_can_test_multiregion()
master_conn = targets.main.master.connection
@ -4558,3 +4558,30 @@ def test_region_bucket_create_secondary_access_master():
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)