commonParity should pick readable FileInfo (#17032)

This commit is contained in:
Krishnan Parthasarathi
2023-04-14 16:23:28 -07:00
committed by GitHub
parent c133979b8e
commit f92450d8b3
3 changed files with 161 additions and 5 deletions

View File

@@ -33,6 +33,7 @@ import (
"github.com/dustin/go-humanize"
uuid2 "github.com/google/uuid"
"github.com/minio/madmin-go/v2"
"github.com/minio/minio/internal/config/storageclass"
)
// Tests isObjectDangling function
@@ -563,6 +564,17 @@ func TestHealingDanglingObject(t *testing.T) {
resetGlobalHealState()
defer resetGlobalHealState()
// Set globalStoragClass.STANDARD to EC:4 for this test
saveSC := globalStorageClass
defer func() {
globalStorageClass = saveSC
}()
globalStorageClass = storageclass.Config{
Standard: storageclass.StorageClass{
Parity: 4,
},
}
nDisks := 16
fsDirs, err := getRandomDisks(nDisks)
if err != nil {
@@ -577,6 +589,8 @@ func TestHealingDanglingObject(t *testing.T) {
t.Fatal(err)
}
setObjectLayer(objLayer)
bucket := getRandomBucketName()
object := getRandomObjectName()
data := bytes.Repeat([]byte("a"), 128*1024)