Skip to content

Commit

Permalink
Run Maven tests against azureblob-sdk in CI
Browse files Browse the repository at this point in the history
References #700.
  • Loading branch information
gaul committed Nov 8, 2024
1 parent 07613b9 commit d4e20ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,18 @@ jobs:
- name: Maven Test
run: |
mvn test
- name: Install dependencies
- name: Install Azurite
run: npx --yes --loglevel info azurite --version
- name: Start Azurite
shell: bash
run: npx --yes azurite azurite-blob &
- name: Maven Test with Azurite
run: |
# TODO: run other test classes
mvn test -Ds3proxy.test.conf=s3proxy-azurite.conf -Dtest=AwsSdkTest
- name: Install s3-tests
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
Expand Down
6 changes: 6 additions & 0 deletions src/test/java/org/gaul/s3proxy/AwsSdkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ public void testSpecialCharacters() throws Exception {

@Test
public void testAtomicMpuAbort() throws Exception {
assumeTrue(!blobStoreType.equals("azureblob-sdk"));

String key = "testAtomicMpuAbort";
var metadata = new ObjectMetadata();
metadata.setContentLength(BYTE_SOURCE.size());
Expand Down Expand Up @@ -1536,6 +1538,8 @@ public void testUnknownParameter() throws Exception {

@Test
public void testBlobStoreLocator() throws Exception {
assumeTrue(blobStoreType.equals("filesystem") ||
blobStoreType.equals("transient"));
final BlobStore blobStore1 = context.getBlobStore();
final BlobStore blobStore2 = ContextBuilder
.newBuilder(blobStoreType)
Expand Down Expand Up @@ -1564,6 +1568,8 @@ public Map.Entry<String, BlobStore> locateBlobStore(

// check second access key
client = AmazonS3ClientBuilder.standard()
.withClientConfiguration(
new ClientConfiguration().withMaxErrorRetry(0))
.withCredentials(new AWSStaticCredentialsProvider(
new BasicAWSCredentials("other-identity",
"credential")))
Expand Down

0 comments on commit d4e20ac

Please sign in to comment.