From a2825702f81986d92afd08f99f79eaae82770c89 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 28 Oct 2019 10:36:15 -0700 Subject: [PATCH] Increase maximum 1000 List keys to 10000 (#8444) --- cmd/api-resources_test.go | 4 ++-- cmd/api-response.go | 6 +++--- cmd/posix_test.go | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/api-resources_test.go b/cmd/api-resources_test.go index 81aee118f..a21026658 100644 --- a/cmd/api-resources_test.go +++ b/cmd/api-resources_test.go @@ -64,7 +64,7 @@ func TestListObjectsV2Resources(t *testing.T) { startAfter: "start-after", delimiter: SlashSeparator, fetchOwner: true, - maxKeys: 1000, + maxKeys: maxObjectList, encodingType: "gzip", errCode: ErrNone, }, @@ -150,7 +150,7 @@ func TestListObjectsV1Resources(t *testing.T) { prefix: "photos/", marker: "test", delimiter: SlashSeparator, - maxKeys: 1000, + maxKeys: maxObjectList, encodingType: "gzip", }, } diff --git a/cmd/api-response.go b/cmd/api-response.go index ff9572e6f..d17ec0e62 100644 --- a/cmd/api-response.go +++ b/cmd/api-response.go @@ -34,9 +34,9 @@ import ( const ( timeFormatAMZLong = "2006-01-02T15:04:05.000Z" // Reply date format with nanosecond precision. - maxObjectList = 1000 // Limit number of objects in a listObjectsResponse. - maxUploadsList = 1000 // Limit number of uploads in a listUploadsResponse. - maxPartsList = 1000 // Limit number of parts in a listPartsResponse. + maxObjectList = 10000 // Limit number of objects in a listObjectsResponse. + maxUploadsList = 10000 // Limit number of uploads in a listUploadsResponse. + maxPartsList = 10000 // Limit number of parts in a listPartsResponse. ) // LocationResponse - format for location response. diff --git a/cmd/posix_test.go b/cmd/posix_test.go index 3e29f9d47..745ac89f6 100644 --- a/cmd/posix_test.go +++ b/cmd/posix_test.go @@ -1231,14 +1231,14 @@ func TestPosixReadFile(t *testing.T) { t.Fatalf("Unable to change permission to temporary directory %v. %v", permDeniedDir, err) } - posixStorage, err = newPosix(permDeniedDir) + posixPermStorage, err := newPosix(permDeniedDir) if err != nil { t.Fatalf("Unable to initialize posix, %s", err) } // Common read buffer. var buf = make([]byte, 10) - if _, err = posixStorage.ReadFile("mybucket", "myobject", 0, buf, v); err != errFileAccessDenied { + if _, err = posixPermStorage.ReadFile("mybucket", "myobject", 0, buf, v); err != errFileAccessDenied { t.Errorf("expected: %s, got: %s", errFileAccessDenied, err) } } @@ -1256,7 +1256,7 @@ func TestPosixReadFile(t *testing.T) { t.Fatalf("Expected \"Faulty Disk\", got: \"%s\"", err) } } else { - t.Fatalf("Expected the StorageAPI to be of type *posix") + t.Fatalf("Expected the StorageAPI to be of type *posixDiskIDCheck") } }