Skip to content

Commit

Permalink
Allow overriding test configuration at run-time
Browse files Browse the repository at this point in the history
References #700.
  • Loading branch information
gaul committed Oct 27, 2024
1 parent 111a681 commit 00142f3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/test/java/org/gaul/s3proxy/AwsSdkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public final class AwsSdkTest {
@Before
public void setUp() throws Exception {
TestUtils.S3ProxyLaunchInfo info = TestUtils.startS3Proxy(
"s3proxy.conf");
System.getProperty("s3proxy.test.conf", "s3proxy.conf"));
awsCreds = new BasicAWSCredentials(info.getS3Identity(),
info.getS3Credential());
context = info.getBlobStore().getContext();
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/gaul/s3proxy/JcloudsBucketsLiveTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ protected void awaitConsistency() {
protected Properties setupProperties() {
TestUtils.S3ProxyLaunchInfo info;
try {
info = TestUtils.startS3Proxy("s3proxy.conf");
info = TestUtils.startS3Proxy(
System.getProperty("s3proxy.test.conf", "s3proxy.conf"));
s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext();
blobStoreType = context.unwrap().getProviderMetadata().getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ protected void awaitConsistency() {
protected Properties setupProperties() {
TestUtils.S3ProxyLaunchInfo info;
try {
info = TestUtils.startS3Proxy("s3proxy.conf");
info = TestUtils.startS3Proxy(
System.getProperty("s3proxy.test.conf", "s3proxy.conf"));
s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext();
blobStoreType = context.unwrap().getProviderMetadata().getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ protected void awaitConsistency() {
protected Properties setupProperties() {
TestUtils.S3ProxyLaunchInfo info;
try {
info = TestUtils.startS3Proxy("s3proxy.conf");
info = TestUtils.startS3Proxy(
System.getProperty("s3proxy.test.conf", "s3proxy.conf"));
s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext();
} catch (Exception e) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/gaul/s3proxy/JcloudsS3ClientLiveTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ protected void awaitConsistency() {
protected Properties setupProperties() {
TestUtils.S3ProxyLaunchInfo info;
try {
info = TestUtils.startS3Proxy("s3proxy.conf");
info = TestUtils.startS3Proxy(
System.getProperty("s3proxy.test.conf", "s3proxy.conf"));
s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext();
blobStoreType = context.unwrap().getProviderMetadata().getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ protected void awaitConsistency() {
protected Properties setupProperties() {
TestUtils.S3ProxyLaunchInfo info;
try {
info = TestUtils.startS3Proxy("s3proxy.conf");
info = TestUtils.startS3Proxy(
System.getProperty("s3proxy.test.conf", "s3proxy.conf"));
s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext();
blobStoreType = context.unwrap().getProviderMetadata().getId();
Expand Down

0 comments on commit 00142f3

Please sign in to comment.