feat: implement S3 attachments and presigned uploads
This commit is contained in:
+15
-5
@@ -40,12 +40,22 @@ def main():
|
||||
alice,bob,eve,chat = c.bootstrap()
|
||||
sent = c.message(alice,chat,'Сохранить при отказе')
|
||||
original = sent['json']
|
||||
target = sent['headers'].get('X-Instance-Id','')
|
||||
|
||||
target = sent['headers'].get('X-Instance-Id', '')
|
||||
attachment = content = None
|
||||
if LAB>=4:
|
||||
attachment,content = c.attachment(alice,chat)
|
||||
if LAB>=5:
|
||||
attachment = c.wait_ready(alice,attachment)
|
||||
|
||||
if LAB >= 4:
|
||||
attachment, content, upload_instance = c.attachment(alice, chat, include_instance=True)
|
||||
|
||||
if args.mode == 'failover':
|
||||
check(bool(upload_instance), 'attachment upload response has no X-Instance-Id')
|
||||
target = upload_instance
|
||||
|
||||
if LAB >= 5:
|
||||
attachment = c.wait_ready(alice, attachment)
|
||||
|
||||
if args.mode == 'failover':
|
||||
check(bool(target), 'target API instance ID is empty')
|
||||
env = dict(os.environ)
|
||||
env['TARGET_INSTANCE_ID'] = target
|
||||
observed = set()
|
||||
|
||||
Reference in New Issue
Block a user