The previous implementation was relying on 'GetBucketLocation' however
this seems flawed as the pointer could be nil (trigger panics), and
the returned result would not fully match the existing regions; as the
result of location are following:
https://github.com/aws/aws-sdk-go/blob/master/service/s3/api.go#L24385
So this would have worked only for a handful of cases. Using
GetBucketRegionWithClient should solve that, however it is not scoped to
any interface/struct, so it makes the testing more painful.
Coverage remained the same at 66.124% when pulling 1bf35da314006b8eee59ac9a3c6e67d3fbefe370 on hr-50 into f0c460953ee7206dcdb54242c451fb25c987026c on master.
The previous implementation was relying on 'GetBucketLocation' however this seems flawed as the pointer could be
nil
(trigger panics), and the returned result would not fully match the existing regions; as the result of location are following: https://github.com/aws/aws-sdk-go/blob/master/service/s3/api.go#L24385So this would have worked only for a handful of cases. Using GetBucketRegionWithClient should solve that, however it is not scoped to any interface/struct, so it makes the testing more painful.
Closes: https://github.com/cycloidio/raws/issues/50