Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service/s3: Update unit test to clarify implemented behavior #4033

Merged
merged 1 commit into from Jul 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions service/s3/endpoint_test.go
Expand Up @@ -265,14 +265,22 @@ func TestEndpoint(t *testing.T) {
expectedSigningName: "s3-outposts",
expectedSigningRegion: "us-gov-east-1",
},
"Outpost AccessPoint FIPS client region": {
bucket: "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint",
"Outpost AccessPoint FIPS client region, resolved signing region does not match ARN region": {
bucket: "arn:aws-us-gov:s3-outposts:us-gov-unknown-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint",
config: &aws.Config{
EndpointResolver: endpoints.AwsUsGovPartition(),
Region: aws.String("fips-us-gov-east-1"),
Region: aws.String("fips-us-gov-unknown-1"),
},
expectedErr: "ConfigurationError: client region does not match provided ARN region",
},
"Outpost AccessPoint FIPS client region, resolved signing region does match ARN region": {
bucket: "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint",
config: &aws.Config{
EndpointResolver: endpoints.AwsUsGovPartition(),
Region: aws.String("fips-us-gov-west-1"),
},
expectedErr: "use of ARN is not supported when client or request is configured for FIPS",
},
"Outpost AccessPoint FIPS client region with matching ARN region": {
bucket: "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint",
config: &aws.Config{
Expand Down