mirror of
https://github.com/versity/versitygw.git
synced 2026-09-26 09:54:49 +00:00
fix list buckets response for single bucket entry
The xml encoding of the s3.ListBucketsOutput return type was not giving correct results when there is only a single bucket. This revives the old aws xsd schema and generated types that will give more accurate xml encoding results.
This commit is contained in:
@@ -74,8 +74,8 @@ func TestS3ApiController_ListBuckets(t *testing.T) {
|
||||
app := fiber.New()
|
||||
s3ApiController := S3ApiController{
|
||||
be: &BackendMock{
|
||||
ListBucketsFunc: func() (*s3.ListBucketsOutput, error) {
|
||||
return &s3.ListBucketsOutput{}, nil
|
||||
ListBucketsFunc: func() (s3response.ListAllMyBucketsResult, error) {
|
||||
return s3response.ListAllMyBucketsResult{}, nil
|
||||
},
|
||||
},
|
||||
acl: auth.ACLServiceUnsupported{},
|
||||
@@ -92,8 +92,8 @@ func TestS3ApiController_ListBuckets(t *testing.T) {
|
||||
appErr := fiber.New()
|
||||
s3ApiControllerErr := S3ApiController{
|
||||
be: &BackendMock{
|
||||
ListBucketsFunc: func() (*s3.ListBucketsOutput, error) {
|
||||
return nil, s3err.GetAPIError(s3err.ErrMethodNotAllowed)
|
||||
ListBucketsFunc: func() (s3response.ListAllMyBucketsResult, error) {
|
||||
return s3response.ListAllMyBucketsResult{}, s3err.GetAPIError(s3err.ErrMethodNotAllowed)
|
||||
},
|
||||
},
|
||||
acl: auth.ACLServiceUnsupported{},
|
||||
|
||||
Reference in New Issue
Block a user