summaryrefslogtreecommitdiff
path: root/tests/example_filesystems/example_filesystems_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-24 13:50:07 +0200
committerJakob Unterwurzacher2021-08-24 13:50:07 +0200
commitd70875aaa970e9d62f3b188c874da229636325dd (patch)
tree8383f512fb878afb62c88fa9fb8a6547d1e634c5 /tests/example_filesystems/example_filesystems_test.go
parent62ed081c5e3f92855784dea24f14b377de98c511 (diff)
tests/example_filesystems: add deterministic-names and xchacha
Diffstat (limited to 'tests/example_filesystems/example_filesystems_test.go')
-rw-r--r--tests/example_filesystems/example_filesystems_test.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/example_filesystems/example_filesystems_test.go b/tests/example_filesystems/example_filesystems_test.go
index b07b5f3..7ecae81 100644
--- a/tests/example_filesystems/example_filesystems_test.go
+++ b/tests/example_filesystems/example_filesystems_test.go
@@ -382,3 +382,47 @@ func TestExampleFSv13reverse(t *testing.T) {
test_helpers.UnmountPanic(dirC)
test_helpers.UnmountPanic(dirB)
}
+
+// gocryptfs v2.2 introduced -deterministic-names
+func TestExampleFSv22deterministicNames(t *testing.T) {
+ cDir := "v2.2-deterministic-names"
+ pDir := test_helpers.TmpDir + "/" + cDir
+ cDir = tmpFsPath + cDir
+ err := os.Mkdir(pDir, 0777)
+ if err != nil {
+ t.Fatal(err)
+ }
+ test_helpers.MountOrFatal(t, cDir, pDir, "-extpass", "echo test", opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+
+ pDir = pDir + "_m"
+ test_helpers.MountOrFatal(t, cDir, pDir, "-deterministic-names", "-masterkey",
+ "722733f5-b0f399f5-5465ad7a-f0bed125-"+
+ "e82de7b4-045e7608-a5e5c78e-04a1a61e",
+ opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+}
+
+// gocryptfs v2.2 introduced -xchacha
+func TestExampleFSv22xchacha(t *testing.T) {
+ cDir := "v2.2-xchacha"
+ pDir := test_helpers.TmpDir + "/" + cDir
+ cDir = tmpFsPath + cDir
+ err := os.Mkdir(pDir, 0777)
+ if err != nil {
+ t.Fatal(err)
+ }
+ test_helpers.MountOrFatal(t, cDir, pDir, "-extpass", "echo test", opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+
+ pDir = pDir + "_m"
+ test_helpers.MountOrFatal(t, cDir, pDir, "-xchacha", "-masterkey",
+ "44670e7e-32475bfc-bdfb8a8c-be17a767-"+
+ "0679cac0-be705d8c-af41c411-28c40f26",
+ opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+}