From 94a9cd0c96cd3e3d923b4e52179b37cdede5ebe1 Mon Sep 17 00:00:00 2001 From: Mohana Sarmiento <54110182+msarmie@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:21:56 -0500 Subject: [PATCH] Add SWIFT_S3 to list of storage providers to perform content checksum verifications. (#67) --- .../main/java/org/duracloud/mill/bit/BitCheckHandler.java | 1 + .../mill/bit/BitIntegrityCheckTaskProcessorTest.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/workman/src/main/java/org/duracloud/mill/bit/BitCheckHandler.java b/workman/src/main/java/org/duracloud/mill/bit/BitCheckHandler.java index 37f52828..46f583a1 100644 --- a/workman/src/main/java/org/duracloud/mill/bit/BitCheckHandler.java +++ b/workman/src/main/java/org/duracloud/mill/bit/BitCheckHandler.java @@ -57,6 +57,7 @@ abstract class BitCheckHandler { */ private static void initializeContentChecksumCalculatingStorageProviders() { CONTENT_CHECKSUM_CALCULATING_STORAGE_PROVIDERS.add(StorageProviderType.AMAZON_S3); + CONTENT_CHECKSUM_CALCULATING_STORAGE_PROVIDERS.add(StorageProviderType.SWIFT_S3); } public final boolean handle(BitCheckExecutionState bitCheckState) throws TaskExecutionFailedException { diff --git a/workman/src/test/java/org/duracloud/mill/bit/BitIntegrityCheckTaskProcessorTest.java b/workman/src/test/java/org/duracloud/mill/bit/BitIntegrityCheckTaskProcessorTest.java index 84f27822..7e10a948 100644 --- a/workman/src/test/java/org/duracloud/mill/bit/BitIntegrityCheckTaskProcessorTest.java +++ b/workman/src/test/java/org/duracloud/mill/bit/BitIntegrityCheckTaskProcessorTest.java @@ -232,6 +232,11 @@ public void testSuccessWithContentCheckS3() throws Exception { testSuccess(StorageProviderType.AMAZON_S3, true); } + @Test + public void testSuccessWithContentCheckSwift() throws Exception { + testSuccess(StorageProviderType.SWIFT_S3, true); + } + @Test public void testSuccessWithOutContentCheckGlacier() throws Exception { testSuccess(StorageProviderType.AMAZON_GLACIER, false);