Skip to content

Commit 9ff036e

Browse files
committed
qa/rgw: test_rgw_rados_pool_quota expects InsufficientCapacity
Signed-off-by: Casey Bodley <[email protected]>
1 parent 7a06e84 commit 9ff036e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

qa/workunits/rgw/test_rgw_rados_pool_quota.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ def main():
7171
exec_cmd(f'rados -p {DATA_POOL} ls')
7272
log.debug('forced quota to propagate')
7373

74+
# expect uploads to fail at pool quota
75+
try:
76+
bucket.put_object(Key=f'{key}-at-quota', Body=b"new data")
77+
except botocore.exceptions.ClientError as e:
78+
if not e.response['Error']['Code'] == 'InsufficientCapacity':
79+
raise
80+
else:
81+
assert False, 'Upload succeeded at quota limit, expected InsufficientCapacity'
82+
83+
# expect deletions to succeed at pool quota
7484
for obj in objects:
7585
try:
7686
bucket.Object(obj).delete()

0 commit comments

Comments
 (0)