HADOOP-17167 ITestS3AEncryptionWithDefaultS3Settings failing (#2187)
Now skips ITestS3AEncryptionWithDefaultS3Settings.testEncryptionOverRename when server side encryption is not set to sse:kms Contributed by Mukund Thakur
This commit is contained in:
parent
b3660d0147
commit
139a43e98e
|
@ -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.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_ALGORITHM;
|
||||||
import static org.apache.hadoop.fs.s3a.Constants.SERVER_SIDE_ENCRYPTION_KEY;
|
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.S3AEncryptionMethods.SSE_KMS;
|
||||||
import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides;
|
import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides;
|
||||||
|
|
||||||
|
@ -107,6 +108,23 @@ public class ITestS3AEncryptionWithDefaultS3Settings extends
|
||||||
public void testEncryption() throws Throwable {
|
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
|
@Test
|
||||||
public void testEncryptionOverRename2() throws Throwable {
|
public void testEncryptionOverRename2() throws Throwable {
|
||||||
S3AFileSystem fs = getFileSystem();
|
S3AFileSystem fs = getFileSystem();
|
||||||
|
|
Loading…
Reference in New Issue