diff --git a/integration_tests/main_test.go b/integration_tests/main_test.go index c38bc11..4b2c11e 100644 --- a/integration_tests/main_test.go +++ b/integration_tests/main_test.go @@ -3,6 +3,7 @@ package integration_tests // File reading, writing, modification, truncate import ( + "syscall" "bytes" "crypto/md5" "encoding/hex" @@ -192,6 +193,7 @@ func TestFileHoles(t *testing.T) { } } +// sContains - does the slice of strings "haystack" contain "needle"? func sContains(haystack []string, needle string) bool { for _, element := range haystack { if element == needle { @@ -307,3 +309,16 @@ func TestFilenameEncryption(t *testing.T) { t.Errorf("file name encryption not working") } } + +// Test Mkdir and Rmdir +func TestMkdirRmdir(t *testing.T) { + dir := defaultPlainDir + "dir1" + err := os.Mkdir(dir, 0777) + if err != nil { + t.Fatal(err) + } + err = syscall.Rmdir(dir) + if err != nil { + t.Fatal(err) + } +}