summaryrefslogtreecommitdiff
path: root/integration_tests/main_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-25 22:08:07 +0100
committerJakob Unterwurzacher2015-11-25 22:08:07 +0100
commitb5bf59a31d78527171d6d6109b51e8dee7f024c8 (patch)
treee83f2761b98e770ef0b9d6b3259bc7181fc7f3d7 /integration_tests/main_test.go
parent4d466c3412918346144dff609d8f706c6f002581 (diff)
tests: check Mkdir and Rmdir
Diffstat (limited to 'integration_tests/main_test.go')
-rw-r--r--integration_tests/main_test.go15
1 files changed, 15 insertions, 0 deletions
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)
+ }
+}