forked from TrueCloudLab/s3-tests
test multi-delete with object with ending underscore
Fixes: http://tracker.ceph.com/issues/18023 Signed-off-by: Orit Wasserman <owasserm@redhat.com>
This commit is contained in:
parent
f2d087ed8a
commit
e856cbcee6
1 changed files with 5 additions and 3 deletions
|
@ -1038,16 +1038,18 @@ def test_multi_object_delete():
|
||||||
key0.set_contents_from_string('foo')
|
key0.set_contents_from_string('foo')
|
||||||
key1 = bucket.new_key('key1')
|
key1 = bucket.new_key('key1')
|
||||||
key1.set_contents_from_string('bar')
|
key1.set_contents_from_string('bar')
|
||||||
|
key2 = bucket.new_key('_key2_')
|
||||||
|
key2.set_contents_from_string('underscore')
|
||||||
stored_keys = bucket.get_all_keys()
|
stored_keys = bucket.get_all_keys()
|
||||||
eq(len(stored_keys), 2)
|
eq(len(stored_keys), 3)
|
||||||
result = bucket.delete_keys(stored_keys)
|
result = bucket.delete_keys(stored_keys)
|
||||||
eq(len(result.deleted), 2)
|
eq(len(result.deleted), 3)
|
||||||
eq(len(result.errors), 0)
|
eq(len(result.errors), 0)
|
||||||
eq(len(bucket.get_all_keys()), 0)
|
eq(len(bucket.get_all_keys()), 0)
|
||||||
|
|
||||||
# now remove again, should all succeed due to idempotency
|
# now remove again, should all succeed due to idempotency
|
||||||
result = bucket.delete_keys(stored_keys)
|
result = bucket.delete_keys(stored_keys)
|
||||||
eq(len(result.deleted), 2)
|
eq(len(result.deleted), 3)
|
||||||
eq(len(result.errors), 0)
|
eq(len(result.errors), 0)
|
||||||
eq(len(bucket.get_all_keys()), 0)
|
eq(len(bucket.get_all_keys()), 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue