some changes

This commit is contained in:
2026-11-25 18:52:25 +03:00
parent 883b3e0305
commit 734e36fc19
9 changed files with 196 additions and 175 deletions
+4 -1
View File
@@ -33,6 +33,9 @@ def main():
c.call('POST','/api/v1/chats/'+other['id']+'/messages',404,actor=eve,
headers={'X-User-Id':alice['id'],'Idempotency-Key':uuid.uuid4().hex},
body={'text':'','attachment_ids':[att['id']]})
oversized = c.call('POST','/api/v1/chats/'+chat['id']+'/attachments?filename=large.png',
413, actor=alice, raw=b'', headers={'Content-Type':'image/png','Content-Length':'10485761'})
check(oversized['json']['error']['code']=='payload_too_large','unexpected body limit error')
for _ in range(80):
r=c.call('POST','/api/v1/auth/sessions',[401,429])
if r['status']==429:
@@ -40,6 +43,6 @@ def main():
break
else:
raise AssertionError('Login throttle did not activate')
print('PASS: hostname, foreign attachment and ingress rate limit')
print('PASS: hostname, foreign attachment, request size and ingress rate limit')
if __name__=='__main__':
run(main)