This is an automated email from the ASF dual-hosted git repository. stevel pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit 5236c96eadfb74ac39163f8d226f7dac9ba10615 Author: Mukund Thakur <[email protected]> AuthorDate: Fri Sep 4 00:05:24 2020 +0530 HADOOP-17167 ITestS3AEncryptionWithDefaultS3Settings failing (#2187) Now skips ITestS3AEncryptionWithDefaultS3Settings.testEncryptionOverRename when server side encryption is not set to sse:kms Contributed by Mukund Thakur Change-Id: Ifd83d353e9c7c6f7e1195a2c2f138d85cf876bb1 --- .../s3a/ITestS3AEncryptionWithDefaultS3Settings.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionWithDefaultS3Settings.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionWithDefaultS3Settings.java index 5b807c2..c5ef65f 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionWithDefaultS3Settings.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionWithDefaultS3Settings.java @@ -35,6 +35,7 @@ import static org.apache.hadoop.fs.contract.ContractTestUtils.skip; import static org.apache.hadoop.fs.contract.ContractTestUtils.writeDataset; import static org.apache.hadoop.fs.s3a.Constants.SERVER_SIDE_ENCRYPTION_ALGORITHM; import static org.apache.hadoop.fs.s3a.Constants.SERVER_SIDE_ENCRYPTION_KEY; +import static org.apache.hadoop.fs.s3a.EncryptionTestUtils.AWS_KMS_SSE_ALGORITHM; import static org.apache.hadoop.fs.s3a.S3AEncryptionMethods.SSE_KMS; import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides; @@ -107,6 +108,23 @@ public class ITestS3AEncryptionWithDefaultS3Settings extends public void testEncryption() throws Throwable { } + /** + * Skipping if the test bucket is not configured with + * aws:kms encryption algorithm. + */ + @Override + public void testEncryptionOverRename() throws Throwable { + S3AFileSystem fs = getFileSystem(); + Path path = path(getMethodName() + "find-encryption-algo"); + ContractTestUtils.touch(fs, path); + String sseAlgorithm = fs.getObjectMetadata(path).getSSEAlgorithm(); + if(StringUtils.isBlank(sseAlgorithm) || + !sseAlgorithm.equals(AWS_KMS_SSE_ALGORITHM)) { + skip("Test bucket is not configured with " + AWS_KMS_SSE_ALGORITHM); + } + super.testEncryptionOverRename(); + } + @Test public void testEncryptionOverRename2() throws Throwable { S3AFileSystem fs = getFileSystem(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
