tests: add unit test for posix functions. (#2037)

Unit tests for posix operations.

* MakeVol
* DeleteVol
* StatVol
* ListVols
* DeleteFile
* AppendFile
* RenameFile
* StatFile

Fixes #2021
This commit is contained in:
Bala FA
2016-07-03 23:47:08 +05:30
committed by Harshavardhana
parent 55ae7cac42
commit 8d4365d23c
3 changed files with 432 additions and 3 deletions
+2 -3
View File
@@ -97,9 +97,8 @@ func TestUNCPathENOTDIR(t *testing.T) {
// Try to create a file that includes a file in its path components.
// In *nix, this returns syscall.ENOTDIR while in windows we receive the following error.
err = fs.AppendFile("voldir", "/file/obj1", []byte("hello"))
winErr := "The system cannot find the path specified."
if !strings.Contains(err.Error(), winErr) {
t.Errorf("expected to recieve %s, but received %s", winErr, err.Error())
if err != errFileAccessDenied {
t.Errorf("expected: %s, got: %s", errFileAccessDenied, err)
}
}