aboutsummaryrefslogtreecommitdiff
path: root/tests/root_test/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/root_test/main_test.go')
-rw-r--r--tests/root_test/main_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/root_test/main_test.go b/tests/root_test/main_test.go
new file mode 100644
index 0000000..d6d5cc4
--- /dev/null
+++ b/tests/root_test/main_test.go
@@ -0,0 +1,20 @@
+//go:build linux
+
+package root_test
+
+import (
+ "os"
+ "testing"
+
+ "github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
+)
+
+func TestMain(m *testing.M) {
+ test_helpers.ResetTmpDir(true)
+ os.Chmod(test_helpers.DefaultCipherDir, 0777)
+ test_helpers.MountOrExit(test_helpers.DefaultCipherDir, test_helpers.DefaultPlainDir, "-zerokey", "-allow_other")
+ r := m.Run()
+ test_helpers.UnmountPanic(test_helpers.DefaultPlainDir)
+ os.RemoveAll(test_helpers.TmpDir)
+ os.Exit(r)
+}