Upstream versity/versitygw state of the touched files before aed4617372
This commit is contained in:
1 parent
7dce327c11
commit
613c71290f
3 files changed
+73
-120
No files matched your search
@@ -1176,9 +1176,6 @@ func TestS3ApiController_ListObjects(t *testing.T) {
|
||||
emptyMarker := ""
|
||||
listResultEchoed := listResult
|
||||
listResultEchoed.Marker = &emptyMarker
|
||||
// S3 returns NextMarker only when the request has a delimiter
|
||||
listResultNextMarker := listResultEchoed
|
||||
listResultNextMarker.NextMarker = utils.GetStringPtr("my-key")
|
||||
tests := []struct {
|
||||
name string
|
||||
input testInput
|
||||
@@ -1198,6 +1195,24 @@ func TestS3ApiController_ListObjects(t *testing.T) {
|
||||
err: s3err.GetAPIError(s3err.ErrAccessDenied),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "start-after is not supported",
|
||||
input: testInput{
|
||||
locals: defaultLocals,
|
||||
beRes: listResult,
|
||||
queries: map[string]string{
|
||||
"start-after": "my-key",
|
||||
},
|
||||
},
|
||||
output: testOutput{
|
||||
response: &Response{
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: "root",
|
||||
},
|
||||
},
|
||||
err: s3err.GetInvalidArgumentErr(s3err.InvalidArgStartAfter, ""),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid max keys",
|
||||
input: testInput{
|
||||
@@ -1249,45 +1264,6 @@ func TestS3ApiController_ListObjects(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "next marker omitted without delimiter",
|
||||
input: testInput{
|
||||
locals: defaultLocals,
|
||||
beRes: listResultNextMarker,
|
||||
},
|
||||
output: testOutput{
|
||||
response: &Response{
|
||||
Data: listResultEchoed,
|
||||
Headers: map[string]*string{
|
||||
"x-amz-bucket-region": utils.GetStringPtr(defaultRegion),
|
||||
},
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: "root",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "next marker returned with delimiter",
|
||||
input: testInput{
|
||||
locals: defaultLocals,
|
||||
beRes: listResultNextMarker,
|
||||
queries: map[string]string{
|
||||
"delimiter": "delim",
|
||||
},
|
||||
},
|
||||
output: testOutput{
|
||||
response: &Response{
|
||||
Data: listResultNextMarker,
|
||||
Headers: map[string]*string{
|
||||
"x-amz-bucket-region": utils.GetStringPtr(defaultRegion),
|
||||
},
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: "root",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user