test_s3: check stats correct after multipart upload

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2013-02-06 10:31:19 -08:00
parent f6fb47e513
commit d4978eb4d1

View file

@ -3861,6 +3861,11 @@ def test_multipart_upload():
upload = _multipart_upload(bucket, key, 30) upload = _multipart_upload(bucket, key, 30)
upload.complete_upload() upload.complete_upload()
(obj_count, bytes_used) = _head_bucket(bucket)
eq(obj_count, 1)
eq(bytes_used, 30 * 1024 * 1024)
@attr(resource='object') @attr(resource='object')
@attr(method='put') @attr(method='put')
@attr(operation='abort multi-part upload') @attr(operation='abort multi-part upload')
@ -3871,6 +3876,10 @@ def test_abort_multipart_upload():
upload = _multipart_upload(bucket, key, 10) upload = _multipart_upload(bucket, key, 10)
upload.cancel_upload() upload.cancel_upload()
(obj_count, bytes_used) = _head_bucket(bucket)
eq(obj_count, 0)
eq(bytes_used, 0)
@attr(resource='object') @attr(resource='object')
@attr(method='put') @attr(method='put')