From 1c54fcd04bbf274dd5d4300e433bdcb1bb32e1ce Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 11 Jul 2016 20:31:36 +0200 Subject: tests: use unmount wrapper in ResetTmpDir This should make it work on OSX. Also, split unmount into two functions. Depending on what you want, * UnmountErr returns the resulting error * UnmountPanic panics if the error was not nil --- tests/normal/cli_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/normal') diff --git a/tests/normal/cli_test.go b/tests/normal/cli_test.go index 4c634f2..ed3111b 100644 --- a/tests/normal/cli_test.go +++ b/tests/normal/cli_test.go @@ -17,7 +17,7 @@ func TestMain(m *testing.M) { test_helpers.ResetTmpDir(false) test_helpers.MountOrExit(test_helpers.DefaultCipherDir, test_helpers.DefaultPlainDir, "--zerokey") r := m.Run() - test_helpers.Unmount(test_helpers.DefaultPlainDir) + test_helpers.UnmountPanic(test_helpers.DefaultPlainDir) os.Exit(r) } @@ -91,7 +91,7 @@ func TestRo(t *testing.T) { dir := test_helpers.InitFS(t) mnt := dir + ".mnt" test_helpers.MountOrFatal(t, dir, mnt, "-ro", "-extpass=echo test") - defer test_helpers.Unmount(mnt) + defer test_helpers.UnmountPanic(mnt) file := mnt + "/file" err := os.Mkdir(file, 0777) -- cgit v1.2.3