mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-23 13:38:38 +00:00
DeleteObjects: ensure 400 MalformedXML is returned for empty list
Ref: https://github.com/ceph/ceph/pull/60579 Signed-off-by: Seena Fallah <seenafallah@gmail.com>
This commit is contained in:
parent
d245097771
commit
9327ccf855
1 changed files with 16 additions and 0 deletions
|
@ -1694,6 +1694,22 @@ def test_multi_object_delete():
|
|||
response = client.list_objects(Bucket=bucket_name)
|
||||
assert 'Contents' not in response
|
||||
|
||||
def test_multi_object_delete_empty_list():
|
||||
bucket_name = get_new_bucket()
|
||||
client = get_client()
|
||||
|
||||
e = assert_raises(ClientError, client.delete_objects, Bucket=bucket_name, Delete={'Objects': [], 'Quiet': False})
|
||||
status = _get_status(e.response)
|
||||
assert status == 400
|
||||
|
||||
def test_multi_object_delete_empty_list_access_forbidden():
|
||||
bucket_name = get_new_bucket()
|
||||
alt_client = get_alt_client()
|
||||
|
||||
e = assert_raises(ClientError, alt_client.delete_objects, Bucket=bucket_name, Delete={'Objects': [], 'Quiet': False})
|
||||
status = _get_status(e.response)
|
||||
assert status == 400
|
||||
|
||||
@pytest.mark.list_objects_v2
|
||||
def test_multi_objectv2_delete():
|
||||
key_names = ['key0', 'key1', 'key2']
|
||||
|
|
Loading…
Reference in a new issue