Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
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;
Expand All @@ -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.
*/
Expand Down Expand Up @@ -435,8 +442,14 @@ public void testCentralEndpointAndNullRegionWithCRUD() throws Throwable {
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(
Expand Down