Glacier - allow zipfiles to be uploaded (#4800)
This commit is contained in:
parent
010d525de0
commit
4bd8f4f96f
@ -55,7 +55,6 @@ class GlacierResponse(BaseResponse):
|
||||
return 204, headers, ""
|
||||
|
||||
def vault_archive_response(self, request, full_url, headers):
|
||||
self.setup_class(request, full_url, headers)
|
||||
return self._vault_archive_response(request, full_url, headers)
|
||||
|
||||
def _vault_archive_response(self, request, full_url, headers):
|
||||
|
BIN
tests/test_glacier/test.gz
Normal file
BIN
tests/test_glacier/test.gz
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
import boto3
|
||||
import os
|
||||
import sure # noqa # pylint: disable=unused-import
|
||||
import pytest
|
||||
|
||||
@ -23,6 +24,21 @@ def test_upload_archive():
|
||||
res.should.have.key("archiveId")
|
||||
|
||||
|
||||
@mock_glacier
|
||||
def test_upload_zip_archive():
|
||||
client = boto3.client("glacier", region_name="us-west-2")
|
||||
client.create_vault(vaultName="asdf")
|
||||
|
||||
path = "test.gz"
|
||||
with open(os.path.join(os.path.dirname(__file__), path), mode="rb") as archive:
|
||||
content = archive.read()
|
||||
|
||||
res = client.upload_archive(vaultName="asdf", body=content)
|
||||
|
||||
res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
|
||||
res.should.have.key("checksum")
|
||||
|
||||
|
||||
@mock_glacier
|
||||
def test_delete_archive():
|
||||
client = boto3.client("glacier", region_name="us-west-2")
|
||||
|
Loading…
Reference in New Issue
Block a user