]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
remove tests that fail on boto3's parameter validation
authorCasey Bodley <cbodley@redhat.com>
Thu, 2 Jun 2022 16:25:24 +0000 (12:25 -0400)
committerAli Maredia <amaredia@redhat.com>
Mon, 6 Jun 2022 18:28:00 +0000 (14:28 -0400)
Fixes: https://tracker.ceph.com/issues/55193
Signed-off-by: Casey Bodley <cbodley@redhat.com>
s3tests_boto3/functional/test_headers.py
s3tests_boto3/functional/test_s3.py

index 47df7763cc22b8e65e4f3c19dddfd5fff66db7e9..9d77d8f47abf76ce43b822b75c677b6d1558f328 100644 (file)
@@ -273,28 +273,6 @@ def test_object_create_bad_contentlength_none():
     eq(status, 411)
     eq(error_code, 'MissingContentLength')
 
-@tag('auth_common')
-@attr(resource='object')
-@attr(method='put')
-@attr(operation='create w/content length too long')
-@attr(assertion='fails 400')
-# TODO: remove 'fails_on_rgw' and once we have learned how to remove the content-length header
-@attr('fails_on_rgw')
-def test_object_create_bad_contentlength_mismatch_above():
-    content = 'bar'
-    length = len(content) + 1
-
-    client = get_client()
-    bucket_name = get_new_bucket()
-    key_name = 'foo'
-    headers = {'Content-Length': str(length)}
-    add_headers = (lambda **kwargs: kwargs['params']['headers'].update(headers))
-    client.meta.events.register('before-sign.s3.PutObject', add_headers)
-
-    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key=key_name, Body=content)
-    status, error_code = _get_status_and_error_code(e.response)
-    eq(status, 400)
-
 @tag('auth_common')
 @attr(resource='object')
 @attr(method='put')
index 9b04a5fac387bcdc33ac011222f191a37b97cc68..a3ecab433309d432d533714994f35c2530bb183f 100644 (file)
@@ -4181,18 +4181,6 @@ def check_invalid_bucketname(invalid_name):
     status, error_code = _get_status_and_error_code(e.response)
     return (status, error_code)
 
-@attr(resource='bucket')
-@attr(method='put')
-@attr(operation='empty name')
-@attr(assertion='fails 405')
-# TODO: remove this fails_on_rgw when I fix it
-@attr('fails_on_rgw')
-def test_bucket_create_naming_bad_short_empty():
-    invalid_bucketname = ''
-    status, error_code = check_invalid_bucketname(invalid_bucketname)
-    eq(status, 405)
-    eq(error_code, 'MethodNotAllowed')
-
 @attr(resource='bucket')
 @attr(method='put')
 @attr(operation='short (one character) name')
@@ -4207,27 +4195,6 @@ def test_bucket_create_naming_bad_short_one():
 def test_bucket_create_naming_bad_short_two():
     check_bad_bucket_name('aa')
 
-# Breaks DNS with SubdomainCallingFormat
-@attr('fails_with_subdomain')
-@attr(resource='bucket')
-@attr(method='put')
-@attr(operation='excessively long names')
-@attr(assertion='fails with subdomain: 400')
-# TODO: remove this fails_on_rgw when I fix it
-@attr('fails_on_rgw')
-def test_bucket_create_naming_bad_long():
-    invalid_bucketname = 256*'a'
-    status, error_code = check_invalid_bucketname(invalid_bucketname)
-    eq(status, 400)
-
-    invalid_bucketname = 280*'a'
-    status, error_code = check_invalid_bucketname(invalid_bucketname)
-    eq(status, 400)
-
-    invalid_bucketname = 3000*'a'
-    status, error_code = check_invalid_bucketname(invalid_bucketname)
-    eq(status, 400)
-
 def check_good_bucket_name(name, _prefix=None):
     """
     Attempt to create a bucket with a specified name
@@ -4350,22 +4317,6 @@ def test_bucket_list_long_name():
 def test_bucket_create_naming_bad_ip():
     check_bad_bucket_name('192.168.5.123')
 
-# Breaks DNS with SubdomainCallingFormat
-@attr('fails_with_subdomain')
-@attr(resource='bucket')
-@attr(method='put')
-@attr(operation='create w/! in name')
-@attr(assertion='fails with subdomain')
-# TODO: remove this fails_on_rgw when I fix it
-@attr('fails_on_rgw')
-def test_bucket_create_naming_bad_punctuation():
-    # characters other than [a-zA-Z0-9._-]
-    invalid_bucketname = 'alpha!soup'
-    status, error_code = check_invalid_bucketname(invalid_bucketname)
-    # TODO: figure out why a 403 is coming out in boto3 but not in boto2.
-    eq(status, 400)
-    eq(error_code, 'InvalidBucketName')
-
 # test_bucket_create_naming_dns_* are valid but not recommended
 @attr(resource='bucket')
 @attr(method='put')