This is an automated email from the ASF dual-hosted git repository. stevel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new a325876feca2 HADOOP-19066. Run FIPS test for valid bucket locations (ADDENDUM) (#6624) a325876feca2 is described below commit a325876feca22fa7bf3c90c678d285181b81b30e Author: Viraj Jasani <vjas...@apache.org> AuthorDate: Wed Mar 13 05:21:50 2024 -0800 HADOOP-19066. Run FIPS test for valid bucket locations (ADDENDUM) (#6624) FIPS is only supported in north america AWS regions; relevant tests in ITestS3AEndpointRegion are skipped for buckets with different endpoints/regions. --- .../org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java index 8fbdcf0b3466..8403b6bd6cb9 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java @@ -51,6 +51,7 @@ import static org.apache.hadoop.fs.s3a.Constants.ENDPOINT; import static org.apache.hadoop.fs.s3a.Constants.FIPS_ENDPOINT; import static org.apache.hadoop.fs.s3a.Constants.PATH_STYLE_ACCESS; import static org.apache.hadoop.fs.s3a.DefaultS3ClientFactory.ERROR_ENDPOINT_WITH_FIPS; +import static org.apache.hadoop.fs.s3a.S3ATestUtils.assume; import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides; import static org.apache.hadoop.fs.s3a.test.PublicDatasetTestUtils.DEFAULT_REQUESTER_PAYS_BUCKET_NAME; import static org.apache.hadoop.io.IOUtils.closeStream; @@ -76,6 +77,12 @@ public class ITestS3AEndpointRegion extends AbstractS3ATestBase { private static final String US_GOV_EAST_1 = "us-gov-east-1"; + private static final String US_REGION_PREFIX = "us-"; + + private static final String CA_REGION_PREFIX = "ca-"; + + private static final String US_DUAL_STACK_PREFIX = "dualstack.us-"; + /** * If anyone were ever to create a bucket with this UUID pair it would break the tests. */ @@ -435,8 +442,14 @@ public class ITestS3AEndpointRegion extends AbstractS3ATestBase { public void testCentralEndpointAndNullRegionFipsWithCRUD() throws Throwable { describe("Access the test bucket using central endpoint and" + " null region and fips enabled, perform file system CRUD operations"); - final Configuration conf = getConfiguration(); + final String bucketLocation = getFileSystem().getBucketLocation(); + assume("FIPS can be enabled to access buckets from US or Canada endpoints only", + bucketLocation.startsWith(US_REGION_PREFIX) + || bucketLocation.startsWith(CA_REGION_PREFIX) + || bucketLocation.startsWith(US_DUAL_STACK_PREFIX)); + + final Configuration conf = getConfiguration(); final Configuration newConf = new Configuration(conf); removeBaseAndBucketOverrides( --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org