aboutsummaryrefslogtreecommitdiff
path: root/integration_tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-27 23:34:55 +0100
committerJakob Unterwurzacher2015-11-28 18:38:06 +0100
commitfe7355f9ee4ae8e52a9b76202e90032d78824f21 (patch)
treeffa2eed00a684b9985a249654e72bba3f82710db /integration_tests
parentb3d96b6a208e7679a0e7dc936d76bcec271ecddf (diff)
diriv: use "DirIV" flag to discern and support mounting old filesystems
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/example_filesystems_test.go2
-rw-r--r--integration_tests/helpers.go5
2 files changed, 4 insertions, 3 deletions
diff --git a/integration_tests/example_filesystems_test.go b/integration_tests/example_filesystems_test.go
index 644f8e7..7924736 100644
--- a/integration_tests/example_filesystems_test.go
+++ b/integration_tests/example_filesystems_test.go
@@ -36,7 +36,7 @@ func TestExampleFsNormal(t *testing.T) {
checkStatusTxt(t, pDir+"status.txt")
unmount(pDir)
mount(cDir, pDir, "-masterkey", "74676e34-0b47c145-00dac61a-17a92316-"+
- "bb57044c-e205b71f-65f4fdca-7cabd4b3")
+ "bb57044c-e205b71f-65f4fdca-7cabd4b3", "-diriv=false")
checkStatusTxt(t, pDir+"status.txt")
unmount(pDir)
err = os.Remove(pDir)
diff --git a/integration_tests/helpers.go b/integration_tests/helpers.go
index 6fc65cf..bff4e5b 100644
--- a/integration_tests/helpers.go
+++ b/integration_tests/helpers.go
@@ -8,6 +8,8 @@ import (
"os"
"os/exec"
"testing"
+
+ "github.com/rfjakob/gocryptfs/cryptfs"
)
// Note: the code assumes that all have a trailing slash
@@ -38,8 +40,7 @@ func resetTmpDir() {
fmt.Println(err)
os.Exit(1)
}
- dirIV := make([]byte, 16)
- err = ioutil.WriteFile(defaultCipherDir+"gocryptfs.diriv", dirIV, 0444)
+ err = cryptfs.WriteDirIV(defaultCipherDir)
if err != nil {
fmt.Println(err)
os.Exit(1)