mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Deprecate showing drive capacity and total free (#5976)
This addresses a situation that we shouldn't be displaying Total/Free anymore, instead we should simply show the total usage.
This commit is contained in:
committed by
kannappanr
parent
e6ec645035
commit
000e360196
@@ -17,39 +17,10 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestStorageInfo - tests storage info.
|
||||
func TestStorageInfo(t *testing.T) {
|
||||
objLayer, fsDirs, err := prepareXL16()
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to initialize 'XL' object layer.")
|
||||
}
|
||||
|
||||
// Remove all dirs.
|
||||
for _, dir := range fsDirs {
|
||||
defer os.RemoveAll(dir)
|
||||
}
|
||||
|
||||
// Get storage info first attempt.
|
||||
disks16Info := objLayer.StorageInfo(context.Background())
|
||||
|
||||
// This test assumes homogenity between all disks,
|
||||
// i.e if we loose one disk the effective storage
|
||||
// usage values is assumed to decrease. If we have
|
||||
// heterogenous environment this is not true all the time.
|
||||
if disks16Info.Free <= 0 {
|
||||
t.Fatalf("Diskinfo total free values should be greater 0")
|
||||
}
|
||||
if disks16Info.Total <= 0 {
|
||||
t.Fatalf("Diskinfo total values should be greater 0")
|
||||
}
|
||||
}
|
||||
|
||||
// Sort valid disks info.
|
||||
func TestSortingValidDisks(t *testing.T) {
|
||||
testCases := []struct {
|
||||
|
||||
Reference in New Issue
Block a user