mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
rgw/s3_boto3:Adds new delete_objects tests for checking key delete limit
This commit is contained in:
parent
a0ef4be7fc
commit
64bdc3beec
1 changed files with 16 additions and 0 deletions
|
@ -2027,6 +2027,22 @@ def test_multi_objectv2_delete():
|
||||||
response = client.list_objects_v2(Bucket=bucket_name)
|
response = client.list_objects_v2(Bucket=bucket_name)
|
||||||
assert 'Contents' not in response
|
assert 'Contents' not in response
|
||||||
|
|
||||||
|
@attr(resource='object')
|
||||||
|
@attr(method='post')
|
||||||
|
@attr(operation='delete multiple objects has upper limit of 1000 keys')
|
||||||
|
@attr(assertion='fails 400')
|
||||||
|
def test_multi_object_delete_key_limit():
|
||||||
|
key_names = [f"key-{i}" for i in range(1001)]
|
||||||
|
bucket_name = _create_objects(keys=key_names)
|
||||||
|
client = get_client()
|
||||||
|
|
||||||
|
response = client.list_objects(Bucket=bucket_name)
|
||||||
|
eq(len(response['Contents']), 1001)
|
||||||
|
|
||||||
|
objs_dict = _make_objs_dict(key_names=key_names)
|
||||||
|
e = assert_raises(ClientError,client.delete_objects,Bucket=bucket_name,Delete=objs_dict)
|
||||||
|
eq(e.response['Error']['Code'], 400)
|
||||||
|
|
||||||
@attr(resource='object')
|
@attr(resource='object')
|
||||||
@attr(method='put')
|
@attr(method='put')
|
||||||
@attr(operation='write zero-byte key')
|
@attr(operation='write zero-byte key')
|
||||||
|
|
Loading…
Reference in a new issue