]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
add case test for read not exist null version 262/head
authorTianshan Qu <tianshan@xsky.com>
Thu, 14 Mar 2019 10:35:17 +0000 (18:35 +0800)
committerTianshan Qu <tianshan@xsky.com>
Tue, 19 Mar 2019 11:32:43 +0000 (19:32 +0800)
http://tracker.ceph.com/issues/38811

Signed-off-by: Tianshan Qu <tianshan@xsky.com>
s3tests/functional/test_s3.py

index f2deb8ef8c1d35b5547078f1ba77d23276b61323..363757f8dd03946152405449423e517fe58b49ac 100644 (file)
@@ -7281,7 +7281,25 @@ def test_versioning_obj_plain_null_version_overwrite_suspended():
 
     eq(len(k), 0)
 
+@attr(resource='object')
+@attr(method='create')
+@attr(operation='create versioned object, read not exist null version')
+@attr(assertion='read null version behaves correctly')
+@attr('versioning')
+def test_versioning_obj_read_not_exist_null():
+    bucket = get_new_bucket()
+    check_versioning(bucket, None)
+
+    check_configure_versioning_retry(bucket, True, "Enabled")
+
+    content = 'fooz'
+    objname = 'testobj'
+
+    key = bucket.new_key(objname)
+    key.set_contents_from_string(content)
 
+    key = bucket.get_key(objname, version_id='null')
+    eq(key, None)
 
 @attr(resource='object')
 @attr(method='create')