Increase maximum 1000 List keys to 10000 (#8444)

master
Harshavardhana 5 years ago committed by GitHub
parent a49d4a9cb2
commit a2825702f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/api-resources_test.go
  2. 6
      cmd/api-response.go
  3. 6
      cmd/posix_test.go

@ -64,7 +64,7 @@ func TestListObjectsV2Resources(t *testing.T) {
startAfter: "start-after", startAfter: "start-after",
delimiter: SlashSeparator, delimiter: SlashSeparator,
fetchOwner: true, fetchOwner: true,
maxKeys: 1000, maxKeys: maxObjectList,
encodingType: "gzip", encodingType: "gzip",
errCode: ErrNone, errCode: ErrNone,
}, },
@ -150,7 +150,7 @@ func TestListObjectsV1Resources(t *testing.T) {
prefix: "photos/", prefix: "photos/",
marker: "test", marker: "test",
delimiter: SlashSeparator, delimiter: SlashSeparator,
maxKeys: 1000, maxKeys: maxObjectList,
encodingType: "gzip", encodingType: "gzip",
}, },
} }

@ -34,9 +34,9 @@ import (
const ( const (
timeFormatAMZLong = "2006-01-02T15:04:05.000Z" // Reply date format with nanosecond precision. timeFormatAMZLong = "2006-01-02T15:04:05.000Z" // Reply date format with nanosecond precision.
maxObjectList = 1000 // Limit number of objects in a listObjectsResponse. maxObjectList = 10000 // Limit number of objects in a listObjectsResponse.
maxUploadsList = 1000 // Limit number of uploads in a listUploadsResponse. maxUploadsList = 10000 // Limit number of uploads in a listUploadsResponse.
maxPartsList = 1000 // Limit number of parts in a listPartsResponse. maxPartsList = 10000 // Limit number of parts in a listPartsResponse.
) )
// LocationResponse - format for location response. // LocationResponse - format for location response.

@ -1231,14 +1231,14 @@ func TestPosixReadFile(t *testing.T) {
t.Fatalf("Unable to change permission to temporary directory %v. %v", permDeniedDir, err) t.Fatalf("Unable to change permission to temporary directory %v. %v", permDeniedDir, err)
} }
posixStorage, err = newPosix(permDeniedDir) posixPermStorage, err := newPosix(permDeniedDir)
if err != nil { if err != nil {
t.Fatalf("Unable to initialize posix, %s", err) t.Fatalf("Unable to initialize posix, %s", err)
} }
// Common read buffer. // Common read buffer.
var buf = make([]byte, 10) 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) 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) t.Fatalf("Expected \"Faulty Disk\", got: \"%s\"", err)
} }
} else { } else {
t.Fatalf("Expected the StorageAPI to be of type *posix") t.Fatalf("Expected the StorageAPI to be of type *posixDiskIDCheck")
} }
} }

Loading…
Cancel
Save