avoid passing around poolIdx, setIdx instead pass the relevant disks (#17660)

This commit is contained in:
Harshavardhana
2023-07-17 09:52:05 -07:00
committed by GitHub
parent 9b5c2c386a
commit 24e86d0c59
5 changed files with 38 additions and 30 deletions

View File

@@ -233,7 +233,12 @@ func TestListOnlineDisks(t *testing.T) {
object := "object"
data := bytes.Repeat([]byte("a"), smallFileThreshold*16)
z := obj.(*erasureServerPools)
erasureDisks := z.serverPools[0].sets[0].getDisks()
erasureDisks, err := z.GetDisks(0, 0)
if err != nil {
t.Fatal(err)
}
for i, test := range testCases {
test := test
t.Run(fmt.Sprintf("case-%d", i), func(t *testing.T) {
@@ -405,7 +410,12 @@ func TestListOnlineDisksSmallObjects(t *testing.T) {
object := "object"
data := bytes.Repeat([]byte("a"), smallFileThreshold/2)
z := obj.(*erasureServerPools)
erasureDisks := z.serverPools[0].sets[0].getDisks()
erasureDisks, err := z.GetDisks(0, 0)
if err != nil {
t.Fatal(err)
}
for i, test := range testCases {
test := test
t.Run(fmt.Sprintf("case-%d", i), func(t *testing.T) {