JCLOUDS-805: ensure overriding of metadata methods

Setting Content-Encoding causes testPutByteSource and
testPutInputStream to fail.  GCS should support this:

https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata#content-encoding
This commit is contained in:
Andrew Gaul 2015-01-16 05:13:25 -08:00
parent 68cc6e7dad
commit 64b41d08c6
1 changed files with 7 additions and 1 deletions

View File

@ -125,15 +125,21 @@ public class GoogleCloudStorageBlobIntegrationLiveTest extends BaseBlobIntegrati
}
}
private void addContentMetadata(PayloadBlobBuilder blobBuilder) {
@Override
protected void addContentMetadata(PayloadBlobBuilder blobBuilder) {
blobBuilder.contentType("text/csv");
blobBuilder.contentDisposition("attachment; filename=photo.jpg");
// TODO: causes failures with subsequent GET operations:
// HTTP/1.1 failed with response: HTTP/1.1 503 Service Unavailable; content: [Service Unavailable]
//blobBuilder.contentEncoding("gzip");
blobBuilder.contentLanguage("en");
}
@Override
protected void checkContentMetadata(Blob blob) {
checkContentType(blob, "text/csv");
checkContentDisposition(blob, "attachment; filename=photo.jpg");
//checkContentEncoding(blob, "gzip");
checkContentLanguage(blob, "en");
}