kopia lustrzana https://github.com/gaul/s3proxy
Update deprecated methods
rodzic
15fe7f32e9
commit
017050dbbd
|
@ -133,7 +133,7 @@ public final class AliasBlobStoreTest {
|
|||
blob = aliasBlobStore.getBlob(aliasContainerName, blobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public final class AliasBlobStoreTest {
|
|||
blob = aliasBlobStore.getBlob(aliasContainerName, blobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ public final class AwsSdkAnonymousTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ public final class AwsSdkTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ public final class AwsSdkTest {
|
|||
expectedContentType);
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ public final class AwsSdkTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ public final class AwsSdkTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ public final class AwsSdkTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ public final class AwsSdkTest {
|
|||
expiration, HttpMethod.GET);
|
||||
try (InputStream actual = url.openStream();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ public final class AwsSdkTest {
|
|||
value = connection.getHeaderField("Content-Type");
|
||||
assertThat(value).isEqualTo(headerOverride.getContentType());
|
||||
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -418,7 +418,7 @@ public final class AwsSdkTest {
|
|||
expiration, HttpMethod.GET);
|
||||
try (InputStream actual = url.openStream();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,7 +464,7 @@ public final class AwsSdkTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ public final class AwsSdkTest {
|
|||
size);
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = byteSource.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -617,7 +617,7 @@ public final class AwsSdkTest {
|
|||
BYTE_SOURCE.size());
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,7 +748,7 @@ public final class AwsSdkTest {
|
|||
/*query=*/ null, /*fragment=*/ null);
|
||||
try (InputStream actual = httpClient.get(uri);
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -808,7 +808,7 @@ public final class AwsSdkTest {
|
|||
S3Object object = client.getObject(containerName, blobName);
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ public final class AwsSdkTest {
|
|||
S3Object object = client.getObject(containerName, blobName);
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
ObjectMetadata newContentMetadata = object.getObjectMetadata();
|
||||
assertThat(newContentMetadata.getContentType()).isEqualTo(
|
||||
|
@ -1056,7 +1056,7 @@ public final class AwsSdkTest {
|
|||
S3Object object = client.getObject(containerName, blobName);
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
ObjectMetadata newContentMetadata = object.getObjectMetadata();
|
||||
if (!Quirks.NO_CACHE_CONTROL_SUPPORT.contains(blobStoreType)) {
|
||||
|
@ -1142,7 +1142,7 @@ public final class AwsSdkTest {
|
|||
S3Object object = client.getObject(containerName, blobName);
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = byteSource.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
ObjectMetadata newContentMetadata = object.getObjectMetadata();
|
||||
if (!Quirks.NO_CACHE_CONTROL_SUPPORT.contains(blobStoreType)) {
|
||||
|
@ -1212,7 +1212,7 @@ public final class AwsSdkTest {
|
|||
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = byteSource.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1314,7 +1314,7 @@ public final class AwsSdkTest {
|
|||
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
|
||||
ObjectMetadata contentMetadata = object.getObjectMetadata();
|
||||
|
@ -1401,7 +1401,7 @@ public final class AwsSdkTest {
|
|||
|
||||
try (InputStream actual = object.getObjectContent();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
|
||||
ObjectMetadata toContentMetadata = object.getObjectMetadata();
|
||||
|
|
|
@ -217,7 +217,7 @@ public final class EncryptedBlobStoreLiveTest extends S3ClientLiveTest {
|
|||
|
||||
try (InputStream actual = object.getPayload().openStream();
|
||||
InputStream expected = byteSource.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
|
||||
// get a 5mb slice that overlap parts
|
||||
|
@ -231,7 +231,7 @@ public final class EncryptedBlobStoreLiveTest extends S3ClientLiveTest {
|
|||
|
||||
try (InputStream actual = object.getPayload().openStream();
|
||||
InputStream expected = partialContent.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ public final class EventualBlobStoreTest {
|
|||
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = BYTE_SOURCE.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@ public final class JcloudsS3ClientLiveTest extends S3ClientLiveTest {
|
|||
@Override
|
||||
protected URL getObjectURL(String containerName, String key)
|
||||
throws Exception {
|
||||
return new URL(String.format("%s/%s/%s", URI.create(endpoint),
|
||||
containerName, key));
|
||||
return URI.create(String.format("%s/%s/%s", URI.create(endpoint),
|
||||
containerName, key)).toURL();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -95,13 +95,13 @@ public final class RegexBlobStoreTest {
|
|||
blob = regexBlobStore.getBlob(containerName, targetBlobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
|
||||
blob = regexBlobStore.getBlob(containerName, initialBlobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,12 +136,12 @@ public final class ShardedBlobStoreTest {
|
|||
blob = shardedBlobStore.getBlob(containerName, blobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
blob2 = shardedBlobStore.getBlob(containerName, blobName2);
|
||||
try (InputStream actual = blob2.getPayload().openStream();
|
||||
InputStream expected = content2.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
|
||||
String blobContainer = null;
|
||||
|
@ -189,7 +189,7 @@ public final class ShardedBlobStoreTest {
|
|||
blob = blobStore.getBlob(unshardedContainer, blobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ public final class ShardedBlobStoreTest {
|
|||
blob = shardedBlobStore.getBlob(containerName, copyBlobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ public final class ShardedBlobStoreTest {
|
|||
blob = shardedBlobStore.getBlob(containerName, blobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ public final class ShardedBlobStoreTest {
|
|||
blob = shardedBlobStore.getBlob(unshardedContainer, blobName);
|
||||
try (InputStream actual = blob.getPayload().openStream();
|
||||
InputStream expected = content.openStream()) {
|
||||
assertThat(actual).hasContentEqualTo(expected);
|
||||
assertThat(actual).hasSameContentAs(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue