mirror of
https://github.com/minio/minio.git
synced 2025-11-22 10:37:42 -05:00
run gofumpt cleanup across code-base (#14015)
This commit is contained in:
@@ -29,24 +29,48 @@ func TestParseStorageClass(t *testing.T) {
|
||||
wantSc StorageClass
|
||||
expectedError error
|
||||
}{
|
||||
{"EC:3", StorageClass{
|
||||
Parity: 3},
|
||||
nil},
|
||||
{"EC:4", StorageClass{
|
||||
Parity: 4},
|
||||
nil},
|
||||
{"AB:4", StorageClass{
|
||||
Parity: 4},
|
||||
errors.New("Unsupported scheme AB. Supported scheme is EC")},
|
||||
{"EC:4:5", StorageClass{
|
||||
Parity: 4},
|
||||
errors.New("Too many sections in EC:4:5")},
|
||||
{"EC:A", StorageClass{
|
||||
Parity: 4},
|
||||
errors.New(`strconv.Atoi: parsing "A": invalid syntax`)},
|
||||
{"AB", StorageClass{
|
||||
Parity: 4},
|
||||
errors.New("Too few sections in AB")},
|
||||
{
|
||||
"EC:3",
|
||||
StorageClass{
|
||||
Parity: 3,
|
||||
},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"EC:4",
|
||||
StorageClass{
|
||||
Parity: 4,
|
||||
},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"AB:4",
|
||||
StorageClass{
|
||||
Parity: 4,
|
||||
},
|
||||
errors.New("Unsupported scheme AB. Supported scheme is EC"),
|
||||
},
|
||||
{
|
||||
"EC:4:5",
|
||||
StorageClass{
|
||||
Parity: 4,
|
||||
},
|
||||
errors.New("Too many sections in EC:4:5"),
|
||||
},
|
||||
{
|
||||
"EC:A",
|
||||
StorageClass{
|
||||
Parity: 4,
|
||||
},
|
||||
errors.New(`strconv.Atoi: parsing "A": invalid syntax`),
|
||||
},
|
||||
{
|
||||
"AB",
|
||||
StorageClass{
|
||||
Parity: 4,
|
||||
},
|
||||
errors.New("Too few sections in AB"),
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
gotSc, err := parseStorageClass(tt.storageClassEnv)
|
||||
|
||||
Reference in New Issue
Block a user