From 86fd866a398a293c9e51e30eb6744f36c24d4add Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Mon, 4 Nov 2024 22:54:13 -0800 Subject: [PATCH] Experiment with Azurite and GitHub CI References #700. --- .github/workflows/ci-main.yml | 19 +++++++++++++++++-- .../java/org/gaul/s3proxy/AwsSdkTest.java | 2 ++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 4bb6dd1b..783134de 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -46,9 +46,20 @@ jobs: type=ref,event=tag labels: | org.opencontainers.image.licenses=Apache-2.0 + + azurite-job: + runs-on: ubuntu-latest + container: mcr.microsoft.com/azure-storage/azurite + services: + azurite: + image: azurite + ports: 10000:10000 + options: azurite-blob --blobHost 0.0.0.0 + runTests: runs-on: ubuntu-latest - needs: [meta] + needs: [meta, azurite-job] + steps: - uses: actions/checkout@v4 with: @@ -74,7 +85,11 @@ jobs: - name: Maven Test run: | mvn test - - name: Install dependencies + - 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 dependencies 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..67238f81 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());