From 0634d6ee50ecb8ce1ced33f170f4c1040bb763e7 Mon Sep 17 00:00:00 2001 From: Tianshan Qu Date: Thu, 14 Mar 2019 18:35:17 +0800 Subject: [PATCH] add case test for read not exist null version http://tracker.ceph.com/issues/38811 Signed-off-by: Tianshan Qu --- s3tests/functional/test_s3.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index f2deb8e..363757f 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -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')