summaryrefslogtreecommitdiff
path: root/tests/reverse/main_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 15:05:09 +0200
committerJakob Unterwurzacher2016-09-25 16:43:17 +0200
commit2050c7f3b3822a4a3329d4ba5b146d269ef05b4d (patch)
tree69e5639a02498e37fa4f1aa3af6f605f756f42cc /tests/reverse/main_test.go
parentf8da264222f7348c6b9e6dd9d372200f850d2878 (diff)
reverse: add gcmsiv flag and associated tests
Diffstat (limited to 'tests/reverse/main_test.go')
-rw-r--r--tests/reverse/main_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/reverse/main_test.go b/tests/reverse/main_test.go
new file mode 100644
index 0000000..3d10750
--- /dev/null
+++ b/tests/reverse/main_test.go
@@ -0,0 +1,32 @@
+package reverse_test
+
+import (
+ "os"
+ "testing"
+
+ "github.com/rfjakob/gocryptfs/tests/test_helpers"
+)
+
+var dirA, dirB, dirC string
+
+func TestMain(m *testing.M) {
+ dirA = test_helpers.TmpDir + "/a"
+ dirB = test_helpers.TmpDir + "/b"
+ dirC = test_helpers.TmpDir + "/c"
+ if err := os.Mkdir(dirA, 0700); err != nil {
+ panic(err)
+ }
+ if err := os.Mkdir(dirB, 0700); err != nil {
+ panic(err)
+ }
+ if err := os.Mkdir(dirC, 0700); err != nil {
+ panic(err)
+ }
+ test_helpers.MountOrExit(dirA, dirB, "-zerokey", "-reverse")
+ test_helpers.MountOrExit(dirB, dirC, "-zerokey", "-gcmsiv")
+ r := m.Run()
+ test_helpers.UnmountPanic(dirC)
+ test_helpers.UnmountPanic(dirB)
+ os.RemoveAll(test_helpers.TmpDir)
+ os.Exit(r)
+}