aboutsummaryrefslogtreecommitdiff
path: root/integration_tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-27 21:50:11 +0100
committerJakob Unterwurzacher2015-11-27 21:51:40 +0100
commit798e5eb5e7c96384f40567bf7426621ca8373e15 (patch)
tree01365fc5aba5e1dd17675f284005d0d74fd0e721 /integration_tests
parentbdd9249a52d5ba2935625b9aeb12240214495e6f (diff)
tests: create all-zero gocryptfs.diriv in resetTmpDir()
Tests were failing because this file was missing
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/example_filesystems_test.go2
-rw-r--r--integration_tests/helpers.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/integration_tests/example_filesystems_test.go b/integration_tests/example_filesystems_test.go
index b208d39..be9ef67 100644
--- a/integration_tests/example_filesystems_test.go
+++ b/integration_tests/example_filesystems_test.go
@@ -15,7 +15,7 @@ const statusTxtContent = "It works!\n"
func checkStatusTxt(t *testing.T, filename string) {
contentBytes, err := ioutil.ReadFile(filename)
if err != nil {
- t.Error(err)
+ t.Fatal(err)
}
content := string(contentBytes)
if content != statusTxtContent {
diff --git a/integration_tests/helpers.go b/integration_tests/helpers.go
index 87e133b..3d6811f 100644
--- a/integration_tests/helpers.go
+++ b/integration_tests/helpers.go
@@ -38,6 +38,12 @@ func resetTmpDir() {
fmt.Println(err)
os.Exit(1)
}
+ dirIV := make([]byte, 16)
+ err = ioutil.WriteFile(defaultCipherDir + "gocryptfs.diriv", dirIV, 0444)
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
}
// mount CIPHERDIR "c" on PLAINDIR "p"