use of com.amazonaws.services.s3.model.WriteGetObjectResponseRequest in project aws-sdk-java-v2 by aws.
the class S3ObjectLambdaOperationEndpointResolverTest method writeGetObjectResponse_regionIsAwsGlobal_shouldConvertEndpoint.
@Test
// TODO: Taken from the SEP but this test case is suspect. The SEP
@Disabled
public // the resulting endpoint is s3-object-lambda.amazonaws.com
void writeGetObjectResponse_regionIsAwsGlobal_shouldConvertEndpoint() {
String requestRoute = "route";
String region = "aws-global";
String expectedHost = "route.s3-object-lambda.us-east-1.amazonaws.com";
WriteGetObjectResponseRequest request = WriteGetObjectResponseRequest.builder().requestRoute(requestRoute).build();
verifyObjectLambdaEndpoint("https", request, region, null, URI.create("https://" + expectedHost), S3Configuration.builder());
verifyObjectLambdaEndpoint("http", request, region, null, URI.create("http://" + expectedHost), S3Configuration.builder());
}
use of com.amazonaws.services.s3.model.WriteGetObjectResponseRequest in project aws-sdk-java-v2 by aws.
the class S3ObjectLambdaOperationEndpointResolverTest method writeGetObjectResponse_nonStandardPartitionRegion_shouldConvertEndpointWithCorrectDnsSuffix.
@Test
public void writeGetObjectResponse_nonStandardPartitionRegion_shouldConvertEndpointWithCorrectDnsSuffix() {
String requestRoute = "route";
String region = "cn-north-1";
String expectedHost = "route.s3-object-lambda.cn-north-1.amazonaws.com.cn";
WriteGetObjectResponseRequest request = WriteGetObjectResponseRequest.builder().requestRoute(requestRoute).build();
verifyObjectLambdaEndpoint("https", request, region, null, URI.create("https://" + expectedHost), S3Configuration.builder());
verifyObjectLambdaEndpoint("http", request, region, null, URI.create("http://" + expectedHost), S3Configuration.builder());
}
use of com.amazonaws.services.s3.model.WriteGetObjectResponseRequest in project aws-sdk-java-v2 by aws.
the class S3ObjectLambdaOperationEndpointResolverTest method writeGetObjectResponse_regionIsFipsInPrefix_shouldConvertEndpoint.
@Test
// SDK doesn't resolve fips endpoints correctly
@Disabled
public void writeGetObjectResponse_regionIsFipsInPrefix_shouldConvertEndpoint() {
String requestRoute = "route";
String region = "fips-us-gov-east-1";
String expectedHost = "route.s3-object-lambda-fips.us-gov-east-1.amazonaws.com";
WriteGetObjectResponseRequest request = WriteGetObjectResponseRequest.builder().requestRoute(requestRoute).build();
verifyObjectLambdaEndpoint("https", request, region, null, URI.create("https://" + expectedHost), S3Configuration.builder());
verifyObjectLambdaEndpoint("http", request, region, null, URI.create("http://" + expectedHost), S3Configuration.builder());
}
use of com.amazonaws.services.s3.model.WriteGetObjectResponseRequest in project aws-sdk-java-v2 by aws.
the class S3ObjectLambdaOperationEndpointResolverTest method writeGetObjectResponse_endpointOverridden_shouldConvertEndpoint.
@Test
public void writeGetObjectResponse_endpointOverridden_shouldConvertEndpoint() {
String requestRoute = "route";
String region = "us-west-2";
String endpointOverride = "my-endpoint.com";
String expectedHost = "route.my-endpoint.com";
WriteGetObjectResponseRequest request = WriteGetObjectResponseRequest.builder().requestRoute(requestRoute).build();
verifyObjectLambdaEndpoint("https", request, region, URI.create("https://" + endpointOverride), URI.create("https://" + expectedHost), S3Configuration.builder());
verifyObjectLambdaEndpoint("http", request, region, URI.create("http://" + endpointOverride), URI.create("http://" + expectedHost), S3Configuration.builder());
}
use of com.amazonaws.services.s3.model.WriteGetObjectResponseRequest in project aws-sdk-java-v2 by aws.
the class S3ObjectLambdaOperationEndpointResolverTest method writeGetObjectResponse_shouldConvertEndpoint.
@Test
public void writeGetObjectResponse_shouldConvertEndpoint() {
String requestRoute = "route";
String region = "us-west-2";
String expectedHost = "route.s3-object-lambda.us-west-2.amazonaws.com";
WriteGetObjectResponseRequest request = WriteGetObjectResponseRequest.builder().requestRoute(requestRoute).build();
verifyObjectLambdaEndpoint("https", request, region, null, URI.create("https://" + expectedHost), S3Configuration.builder());
verifyObjectLambdaEndpoint("http", request, region, null, URI.create("http://" + expectedHost), S3Configuration.builder());
}
Aggregations