diff options
author | Jakob Unterwurzacher | 2016-07-11 20:31:36 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-07-11 20:41:16 +0200 |
commit | 1c54fcd04bbf274dd5d4300e433bdcb1bb32e1ce (patch) | |
tree | db467866f9435cb493f1ee321f54b37032aec7a3 /tests/normal | |
parent | 621cbad5e139a0bdbfde598d3c8ce82b0d43af66 (diff) |
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
Diffstat (limited to 'tests/normal')
-rw-r--r-- | tests/normal/cli_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) |