From 4db5a8c5dd36d01510ca8b4d0389e47c8add9b0f Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Mon, 4 Nov 2024 22:54:13 -0800 Subject: [PATCH] Run Maven tests against azureblob-sdk in CI References #700. --- .github/workflows/ci-main.yml | 13 ++++++++++++- src/test/java/org/gaul/s3proxy/AwsSdkTest.java | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 4bb6dd1b..2fec08ab 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -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 diff --git a/src/test/java/org/gaul/s3proxy/AwsSdkTest.java b/src/test/java/org/gaul/s3proxy/AwsSdkTest.java index 3cac2fb4..742836e9 100644 --- a/src/test/java/org/gaul/s3proxy/AwsSdkTest.java +++ b/src/test/java/org/gaul/s3proxy/AwsSdkTest.java @@ -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()); @@ -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) @@ -1564,6 +1568,8 @@ public Map.Entry locateBlobStore( // check second access key client = AmazonS3ClientBuilder.standard() + .withClientConfiguration( + new ClientConfiguration().withMaxErrorRetry(0)) .withCredentials(new AWSStaticCredentialsProvider( new BasicAWSCredentials("other-identity", "credential")))