kopia lustrzana https://github.com/gaul/s3proxy
Parameterize TestUtils.startS3Proxy
rodzic
0f26d65846
commit
c410df593d
|
|
@ -127,7 +127,8 @@ public final class AwsSdkTest {
|
|||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
TestUtils.S3ProxyLaunchInfo info = TestUtils.startS3Proxy();
|
||||
TestUtils.S3ProxyLaunchInfo info = TestUtils.startS3Proxy(
|
||||
"s3proxy.conf");
|
||||
awsCreds = new BasicAWSCredentials(info.getS3Identity(),
|
||||
info.getS3Credential());
|
||||
context = info.getBlobStore().getContext();
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public final class JcloudsBucketsLiveTest extends BucketsLiveTest {
|
|||
protected Properties setupProperties() {
|
||||
TestUtils.S3ProxyLaunchInfo info;
|
||||
try {
|
||||
info = TestUtils.startS3Proxy();
|
||||
info = TestUtils.startS3Proxy("s3proxy.conf");
|
||||
s3Proxy = info.getS3Proxy();
|
||||
context = info.getBlobStore().getContext();
|
||||
blobStoreType = context.unwrap().getProviderMetadata().getId();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public final class JcloudsS3BlobIntegrationLiveTest
|
|||
protected Properties setupProperties() {
|
||||
TestUtils.S3ProxyLaunchInfo info;
|
||||
try {
|
||||
info = TestUtils.startS3Proxy();
|
||||
info = TestUtils.startS3Proxy("s3proxy.conf");
|
||||
s3Proxy = info.getS3Proxy();
|
||||
context = info.getBlobStore().getContext();
|
||||
blobStoreType = context.unwrap().getProviderMetadata().getId();
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public final class JcloudsS3BlobSignerLiveTest extends S3BlobSignerLiveTest {
|
|||
protected Properties setupProperties() {
|
||||
TestUtils.S3ProxyLaunchInfo info;
|
||||
try {
|
||||
info = TestUtils.startS3Proxy();
|
||||
info = TestUtils.startS3Proxy("s3proxy.conf");
|
||||
s3Proxy = info.getS3Proxy();
|
||||
context = info.getBlobStore().getContext();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public final class JcloudsS3ClientLiveTest extends S3ClientLiveTest {
|
|||
protected Properties setupProperties() {
|
||||
TestUtils.S3ProxyLaunchInfo info;
|
||||
try {
|
||||
info = TestUtils.startS3Proxy();
|
||||
info = TestUtils.startS3Proxy("s3proxy.conf");
|
||||
s3Proxy = info.getS3Proxy();
|
||||
context = info.getBlobStore().getContext();
|
||||
blobStoreType = context.unwrap().getProviderMetadata().getId();
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public final class JcloudsS3ContainerIntegrationLiveTest
|
|||
protected Properties setupProperties() {
|
||||
TestUtils.S3ProxyLaunchInfo info;
|
||||
try {
|
||||
info = TestUtils.startS3Proxy();
|
||||
info = TestUtils.startS3Proxy("s3proxy.conf");
|
||||
s3Proxy = info.getS3Proxy();
|
||||
context = info.getBlobStore().getContext();
|
||||
blobStoreType = context.unwrap().getProviderMetadata().getId();
|
||||
|
|
|
|||
|
|
@ -152,11 +152,11 @@ final class TestUtils {
|
|||
}
|
||||
}
|
||||
|
||||
static S3ProxyLaunchInfo startS3Proxy() throws Exception {
|
||||
static S3ProxyLaunchInfo startS3Proxy(String configFile) throws Exception {
|
||||
S3ProxyLaunchInfo info = new S3ProxyLaunchInfo();
|
||||
|
||||
try (InputStream is = Resources.asByteSource(Resources.getResource(
|
||||
"s3proxy.conf")).openStream()) {
|
||||
configFile)).openStream()) {
|
||||
info.getProperties().load(is);
|
||||
}
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue