Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Maven tests against azureblob-sdk in CI #716

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading