mirror of
https://github.com/ceph/s3-tests.git
synced 2024-12-23 23:25:28 +00:00
Merge pull request #89 from andrewgaul/atomic-multipart-upload
Test begin to overwrite file with MPU then abort Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
a13f6441ae
1 changed files with 21 additions and 0 deletions
|
@ -5671,6 +5671,27 @@ def test_atomic_write_bucket_gone():
|
|||
eq(e.reason, 'Not Found')
|
||||
eq(e.error_code, 'NoSuchBucket')
|
||||
|
||||
@attr(resource='object')
|
||||
@attr(method='put')
|
||||
@attr(operation='begin to overwrite file with multipart upload then abort')
|
||||
@attr(assertion='read back original key contents')
|
||||
def test_atomic_multipart_upload_write():
|
||||
bucket = get_new_bucket()
|
||||
key = bucket.new_key('foo')
|
||||
key.set_contents_from_string('bar')
|
||||
|
||||
upload = bucket.initiate_multipart_upload(key)
|
||||
|
||||
key = bucket.get_key('foo')
|
||||
got = key.get_contents_as_string()
|
||||
eq(got, 'bar')
|
||||
|
||||
upload.cancel_upload()
|
||||
|
||||
key = bucket.get_key('foo')
|
||||
got = key.get_contents_as_string()
|
||||
eq(got, 'bar')
|
||||
|
||||
@attr(resource='object')
|
||||
@attr(method='get')
|
||||
@attr(operation='range')
|
||||
|
|
Loading…
Reference in a new issue