s3: Do not use deprecated EndpointResolver #193

Merged
acid-ant merged 1 commit from dkirillov/xk6-frostfs:feature/192-fix_deprecated_aws_configuration into master 2025-01-13 18:19:47 +00:00

View file

@ -53,17 +53,8 @@ func (s *S3) Exports() modules.Exports {
}
func (s *S3) Connect(endpoint string, params map[string]string) (*Client, error) {
// TODO: #192 Do not use deprecated `aws.EndpointResolver`
// nolint:staticcheck
resolver := aws.EndpointResolverWithOptionsFunc(func(_, _ string, _ ...interface{}) (aws.Endpoint, error) {
return aws.Endpoint{
URL: endpoint,
}, nil
})
// nolint:staticcheck
cfg, err := config.LoadDefaultConfig(s.vu.Context(),
config.WithEndpointResolverWithOptions(resolver),
config.WithBaseEndpoint(endpoint),
config.WithSharedConfigProfile(params["aws_profile"]))
if err != nil {
return nil, fmt.Errorf("configuration error: %w", err)