mirror of
https://github.com/versity/versitygw.git
synced 2026-01-07 04:06:23 +00:00
fix: Added KeyCount property in ListObjectsV2 action result, added a test case for one
This commit is contained in:
@@ -1317,6 +1317,7 @@ func (p *Posix) ListObjectsV2(input *s3.ListObjectsV2Input) (*s3.ListObjectsV2Ou
|
||||
Name: &bucket,
|
||||
NextContinuationToken: &results.NextMarker,
|
||||
Prefix: &prefix,
|
||||
KeyCount: int32(len(results.Objects)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -426,6 +426,10 @@ func TestListObject(s *S3Conf) {
|
||||
failF("object %v not found", obj2)
|
||||
return
|
||||
}
|
||||
if out.KeyCount != 2 {
|
||||
failF("%v: expected key count: %v, instead got: %v", testname, 2, out.KeyCount)
|
||||
return
|
||||
}
|
||||
|
||||
ctx, cancel = context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err = s3client.DeleteObject(ctx, &s3.DeleteObjectInput{
|
||||
|
||||
Reference in New Issue
Block a user