posix: remove disk free space check for read-only and delete methods. (#2033)

This commit is contained in:
Bala FA authored and Harshavardhana committed 2016-06-29 11:25:35 -07:00
1 parent 0e3907072c
commit 57bc08cc7e
2 files changed
+53 -21

No files matched your search

+24
View File
@@ -22,6 +22,30 @@ import (
"testing"
)
// Tests posix.getDiskInfo()
func TestGetDiskInfo(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "minio-")
if err != nil {
t.Fatalf("Unable to create a temporary directory, %s", err)
}
defer removeAll(path)
testCases := []struct {
diskPath string
expectedErr error
}{
{path, nil},
{"/nonexistent-dir", errDiskNotFound},
}
// Check test cases.
for _, testCase := range testCases {
if _, err := getDiskInfo(testCase.diskPath); err != testCase.expectedErr {
t.Fatalf("expected: %s, got: %s", testCase.expectedErr, err)
}
}
}
// Tests the functionality implemented by ReadAll storage API.
func TestReadAll(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "minio-")