From cc5d5a3fcdabca0ecd86646091c545509351dbbe Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 6 Jun 2016 22:30:39 +0200 Subject: tests: error out properly on mount failure In TestMain we call os.Exit as before, but inside actual tests we now call t.Fatal(). --- integration_tests/main_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'integration_tests/main_test.go') 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) -- cgit v1.2.3