aboutsummaryrefslogtreecommitdiff
path: root/integration_tests/main_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-06 22:30:39 +0200
committerJakob Unterwurzacher2016-06-06 22:30:39 +0200
commitcc5d5a3fcdabca0ecd86646091c545509351dbbe (patch)
tree486f77b3688d96200f1dd94df0225dac26e3beeb /integration_tests/main_test.go
parent0c80cca674931c9dbfc69c25df24d53abbdd63a9 (diff)
tests: error out properly on mount failure
In TestMain we call os.Exit as before, but inside actual tests we now call t.Fatal().
Diffstat (limited to 'integration_tests/main_test.go')
-rw-r--r--integration_tests/main_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integration_tests/main_test.go b/integration_tests/main_test.go
index cd2c228..c7607ce 100644
--- a/integration_tests/main_test.go
+++ b/integration_tests/main_test.go
@@ -28,7 +28,7 @@ func TestMain(m *testing.M) {
fmt.Println("***** Testing with OpenSSL")
}
resetTmpDir(false) // <- this also create gocryptfs.diriv
- mount(defaultCipherDir, defaultPlainDir, "--zerokey")
+ mountOrExit(defaultCipherDir, defaultPlainDir, "--zerokey")
r := m.Run()
unmount(defaultPlainDir)
@@ -44,7 +44,7 @@ func TestMain(m *testing.M) {
fmt.Println("***** Testing with native Go crypto")
}
resetTmpDir(false)
- mount(defaultCipherDir, defaultPlainDir, "--zerokey", "--openssl=false")
+ mountOrExit(defaultCipherDir, defaultPlainDir, "--zerokey", "--openssl=false")
r = m.Run()
unmount(defaultPlainDir)
@@ -56,7 +56,7 @@ func TestMain(m *testing.M) {
fmt.Println("***** Testing \"--plaintextnames\"")
}
resetTmpDir(true) // do not create gocryptfs.diriv
- mount(defaultCipherDir, defaultPlainDir, "--zerokey", "--plaintextnames")
+ mountOrExit(defaultCipherDir, defaultPlainDir, "--zerokey", "--plaintextnames")
plaintextNames = true
r = m.Run()
unmount(defaultPlainDir)