Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/storage/chunk/client/aws/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestS3ClientOptions(t *testing.T) {
opts := s3.Options{}
fn(&opts)

require.Equal(t, "", opts.Region)
require.Equal(t, InvalidAWSRegion, opts.Region) // it is still required to set region explicitly
require.Equal(t, "http://s3.us-east-0.amazonaws.com", *opts.BaseEndpoint)
})

Expand All @@ -120,7 +120,7 @@ func TestS3ClientOptions(t *testing.T) {
opts := s3.Options{}
fn(&opts)

require.Equal(t, "", opts.Region)
require.Equal(t, InvalidAWSRegion, opts.Region) // it is still required to set region explicitly
require.Equal(t, "https://s3.us-east-0.amazonaws.com", *opts.BaseEndpoint)
})

Expand Down
4 changes: 3 additions & 1 deletion pkg/storage/chunk/client/aws/s3_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ func s3ClientConfigFunc(cfg S3Config, hedgingCfg hedging.Config, hedging bool) (
// s3://<key>:<secret>@us-east-0/<bucketname>
opts.Region = awsURL.Host
}
} else {
}
if opts.Region == "" {
// Not sure why this is needed, but test otherwise time out when run in CI
opts.Region = InvalidAWSRegion
}

Expand Down