]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
test_s3: check stats correct after multipart upload
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 6 Feb 2013 18:31:19 +0000 (10:31 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Wed, 6 Feb 2013 18:34:54 +0000 (10:34 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
s3tests/functional/test_s3.py

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