From 4900d6af3ae23a6ede33cc815649e51ed27d0530 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 10 Sep 2015 13:18:28 -0700 Subject: [PATCH] rgw: test versioned objects with special names E.g., objects that start with undescore Signed-off-by: Yehuda Sadeh --- s3tests/functional/test_s3.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 41bc72c..cbc5af0 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -5959,6 +5959,29 @@ def test_versioning_obj_create_versions_remove_all(): eq(len(k), 0) eq(len(k), len(c)) +@attr(resource='object') +@attr(method='remove') +@attr(operation='create and remove versions') +@attr(assertion='everything works') +@attr('versioning') +def test_versioning_obj_create_versions_remove_special_names(): + bucket = get_new_bucket() + check_versioning(bucket, None) + + check_configure_versioning_retry(bucket, True, "Enabled") + + num_versions = 10 + objnames = ['_testobj', '_', ':', ' '] + + for objname in objnames: + (k, c) = create_multiple_versions(bucket, objname, num_versions) + + _do_remove_versions(bucket, objname, 0, 5, 0.5, k, c) + _do_remove_versions(bucket, objname, 0, 5, 0, k, c) + + eq(len(k), 0) + eq(len(k), len(c)) + @attr(resource='object') @attr(method='multipart') @attr(operation='create and test multipart object')