From eb38a3611448ba711a17aedd6f9654e501d2b2ab Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 28 Nov 2015 20:31:01 +0100 Subject: tests: add v0.5 example filesystem (with DirIV!) --- .../normal/3-HZSwv99agoWgTErV0YFQ== | Bin 56 -> 0 bytes .../normal/6hL2fPVB2aMSh4-UoDn5Kw== | 1 - .../normal/TBIgdfhDKwkXVTnWLVzFSg== | 1 - .../example_filesystems/normal/gocryptfs.conf | 12 --------- .../v0.4/3-HZSwv99agoWgTErV0YFQ== | Bin 0 -> 56 bytes .../v0.4/6hL2fPVB2aMSh4-UoDn5Kw== | 1 + .../v0.4/TBIgdfhDKwkXVTnWLVzFSg== | 1 + .../example_filesystems/v0.4/gocryptfs.conf | 12 +++++++++ .../v0.5/By5HbeLik3V5zkv7Ls1pbg== | 1 + .../v0.5/VxphQR1cIIFkEKhP8f18NQ== | Bin 0 -> 56 bytes .../v0.5/gNdxbufjfWaFvNeyEZ-mUg== | 1 + .../example_filesystems/v0.5/gocryptfs.conf | 14 ++++++++++ .../example_filesystems/v0.5/gocryptfs.diriv | 1 + integration_tests/example_filesystems_test.go | 30 ++++++++++++++++++--- 14 files changed, 57 insertions(+), 18 deletions(-) delete mode 100644 integration_tests/example_filesystems/normal/3-HZSwv99agoWgTErV0YFQ== delete mode 120000 integration_tests/example_filesystems/normal/6hL2fPVB2aMSh4-UoDn5Kw== delete mode 120000 integration_tests/example_filesystems/normal/TBIgdfhDKwkXVTnWLVzFSg== delete mode 100644 integration_tests/example_filesystems/normal/gocryptfs.conf create mode 100644 integration_tests/example_filesystems/v0.4/3-HZSwv99agoWgTErV0YFQ== create mode 120000 integration_tests/example_filesystems/v0.4/6hL2fPVB2aMSh4-UoDn5Kw== create mode 120000 integration_tests/example_filesystems/v0.4/TBIgdfhDKwkXVTnWLVzFSg== create mode 100644 integration_tests/example_filesystems/v0.4/gocryptfs.conf create mode 120000 integration_tests/example_filesystems/v0.5/By5HbeLik3V5zkv7Ls1pbg== create mode 100644 integration_tests/example_filesystems/v0.5/VxphQR1cIIFkEKhP8f18NQ== create mode 120000 integration_tests/example_filesystems/v0.5/gNdxbufjfWaFvNeyEZ-mUg== create mode 100644 integration_tests/example_filesystems/v0.5/gocryptfs.conf create mode 100644 integration_tests/example_filesystems/v0.5/gocryptfs.diriv diff --git a/integration_tests/example_filesystems/normal/3-HZSwv99agoWgTErV0YFQ== b/integration_tests/example_filesystems/normal/3-HZSwv99agoWgTErV0YFQ== deleted file mode 100644 index 5d0af82..0000000 Binary files a/integration_tests/example_filesystems/normal/3-HZSwv99agoWgTErV0YFQ== and /dev/null differ diff --git a/integration_tests/example_filesystems/normal/6hL2fPVB2aMSh4-UoDn5Kw== b/integration_tests/example_filesystems/normal/6hL2fPVB2aMSh4-UoDn5Kw== deleted file mode 120000 index 31b9013..0000000 --- a/integration_tests/example_filesystems/normal/6hL2fPVB2aMSh4-UoDn5Kw== +++ /dev/null @@ -1 +0,0 @@ -3-HZSwv99agoWgTErV0YFQ== \ No newline at end of file diff --git a/integration_tests/example_filesystems/normal/TBIgdfhDKwkXVTnWLVzFSg== b/integration_tests/example_filesystems/normal/TBIgdfhDKwkXVTnWLVzFSg== deleted file mode 120000 index 7a15694..0000000 --- a/integration_tests/example_filesystems/normal/TBIgdfhDKwkXVTnWLVzFSg== +++ /dev/null @@ -1 +0,0 @@ -/tTXhw8tmmz4PK9YG21Whug==/Qe8z0HUArb5bZJjUqEo2Nw==/wv68UB9DLF9OfAcxgRKKtQ==/9No5n3deBUGa-BsvPRi3DQ== \ No newline at end of file diff --git a/integration_tests/example_filesystems/normal/gocryptfs.conf b/integration_tests/example_filesystems/normal/gocryptfs.conf deleted file mode 100644 index 354b4bb..0000000 --- a/integration_tests/example_filesystems/normal/gocryptfs.conf +++ /dev/null @@ -1,12 +0,0 @@ -{ - "EncryptedKey": "He757VFOKOWbMJqJ7HBs67SMSi3Vu8/2vgWNI6j1tVo4JBlNvrQSw6KkCh0lGrHrh6ICbPv4MyoyFdGa", - "ScryptObject": { - "Salt": "MeHSsxsnJwngAwptNzuXQlj7JtF1b0uzZuWvVV3cH3w=", - "N": 65536, - "R": 8, - "P": 1, - "KeyLen": 32 - }, - "Version": 2, - "FeatureFlags": null -} \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.4/3-HZSwv99agoWgTErV0YFQ== b/integration_tests/example_filesystems/v0.4/3-HZSwv99agoWgTErV0YFQ== new file mode 100644 index 0000000..5d0af82 Binary files /dev/null and b/integration_tests/example_filesystems/v0.4/3-HZSwv99agoWgTErV0YFQ== differ diff --git a/integration_tests/example_filesystems/v0.4/6hL2fPVB2aMSh4-UoDn5Kw== b/integration_tests/example_filesystems/v0.4/6hL2fPVB2aMSh4-UoDn5Kw== new file mode 120000 index 0000000..31b9013 --- /dev/null +++ b/integration_tests/example_filesystems/v0.4/6hL2fPVB2aMSh4-UoDn5Kw== @@ -0,0 +1 @@ +3-HZSwv99agoWgTErV0YFQ== \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.4/TBIgdfhDKwkXVTnWLVzFSg== b/integration_tests/example_filesystems/v0.4/TBIgdfhDKwkXVTnWLVzFSg== new file mode 120000 index 0000000..7a15694 --- /dev/null +++ b/integration_tests/example_filesystems/v0.4/TBIgdfhDKwkXVTnWLVzFSg== @@ -0,0 +1 @@ +/tTXhw8tmmz4PK9YG21Whug==/Qe8z0HUArb5bZJjUqEo2Nw==/wv68UB9DLF9OfAcxgRKKtQ==/9No5n3deBUGa-BsvPRi3DQ== \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.4/gocryptfs.conf b/integration_tests/example_filesystems/v0.4/gocryptfs.conf new file mode 100644 index 0000000..354b4bb --- /dev/null +++ b/integration_tests/example_filesystems/v0.4/gocryptfs.conf @@ -0,0 +1,12 @@ +{ + "EncryptedKey": "He757VFOKOWbMJqJ7HBs67SMSi3Vu8/2vgWNI6j1tVo4JBlNvrQSw6KkCh0lGrHrh6ICbPv4MyoyFdGa", + "ScryptObject": { + "Salt": "MeHSsxsnJwngAwptNzuXQlj7JtF1b0uzZuWvVV3cH3w=", + "N": 65536, + "R": 8, + "P": 1, + "KeyLen": 32 + }, + "Version": 2, + "FeatureFlags": null +} \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.5/By5HbeLik3V5zkv7Ls1pbg== b/integration_tests/example_filesystems/v0.5/By5HbeLik3V5zkv7Ls1pbg== new file mode 120000 index 0000000..9f74ead --- /dev/null +++ b/integration_tests/example_filesystems/v0.5/By5HbeLik3V5zkv7Ls1pbg== @@ -0,0 +1 @@ +l7TSsTckQSyPjfmEJGNd8dRrbJCA68YIqD_ZYpKu4UQxlM-8RqA= \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.5/VxphQR1cIIFkEKhP8f18NQ== b/integration_tests/example_filesystems/v0.5/VxphQR1cIIFkEKhP8f18NQ== new file mode 100644 index 0000000..aa686c6 Binary files /dev/null and b/integration_tests/example_filesystems/v0.5/VxphQR1cIIFkEKhP8f18NQ== differ diff --git a/integration_tests/example_filesystems/v0.5/gNdxbufjfWaFvNeyEZ-mUg== b/integration_tests/example_filesystems/v0.5/gNdxbufjfWaFvNeyEZ-mUg== new file mode 120000 index 0000000..2eecd29 --- /dev/null +++ b/integration_tests/example_filesystems/v0.5/gNdxbufjfWaFvNeyEZ-mUg== @@ -0,0 +1 @@ +fgxzwbsvjcQzLLJCh8iXmdL89StySXpiXyLSyGLWuDmDxNVH \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.5/gocryptfs.conf b/integration_tests/example_filesystems/v0.5/gocryptfs.conf new file mode 100644 index 0000000..4aa8951 --- /dev/null +++ b/integration_tests/example_filesystems/v0.5/gocryptfs.conf @@ -0,0 +1,14 @@ +{ + "EncryptedKey": "eEjly8AC1f/7HSiBwZlCWtzYXx+le7HpKu2qf8mcNo6ua2J0N4wasewjkzntU6r2ROdp3hjFQyHtZrCf", + "ScryptObject": { + "Salt": "MHr2o3kUQAHPE7Wc+p4eDDhKrpA8AOwzOo14JYoU89s=", + "N": 65536, + "R": 8, + "P": 1, + "KeyLen": 32 + }, + "Version": 2, + "FeatureFlags": [ + "DirIV" + ] +} \ No newline at end of file diff --git a/integration_tests/example_filesystems/v0.5/gocryptfs.diriv b/integration_tests/example_filesystems/v0.5/gocryptfs.diriv new file mode 100644 index 0000000..25e74aa --- /dev/null +++ b/integration_tests/example_filesystems/v0.5/gocryptfs.diriv @@ -0,0 +1 @@ +«¯úDÈ|å¯?jq \ No newline at end of file diff --git a/integration_tests/example_filesystems_test.go b/integration_tests/example_filesystems_test.go index bd4f21d..6f1574a 100644 --- a/integration_tests/example_filesystems_test.go +++ b/integration_tests/example_filesystems_test.go @@ -44,11 +44,11 @@ func checkExampleContent(t *testing.T, dir string) { } } -// Test example_filesystems/normal +// Test example_filesystems/v0.4 // with password mount and -masterkey mount -func TestExampleFsNormal(t *testing.T) { - pDir := tmpDir + "TestExampleFsNormal/" - cDir := "example_filesystems/normal" +func TestExampleFsV04(t *testing.T) { + pDir := tmpDir + "TestExampleFsV04/" + cDir := "example_filesystems/v0.4" err := os.Mkdir(pDir, 0777) if err != nil { t.Fatal(err) @@ -65,3 +65,25 @@ func TestExampleFsNormal(t *testing.T) { t.Error(err) } } + +// Test example_filesystems/v0.5 +// with password mount and -masterkey mount +func TestExampleFsV05(t *testing.T) { + pDir := tmpDir + "TestExampleFsV05/" + cDir := "example_filesystems/v0.5" + err := os.Mkdir(pDir, 0777) + if err != nil { + t.Fatal(err) + } + mount(cDir, pDir, "-extpass", "echo test") + checkExampleContent(t, pDir) + unmount(pDir) + mount(cDir, pDir, "-masterkey", "e7f38c71-0da80f68-d3b2cd7d-ee4f49e5-"+ + "f8bc98cd-d7976950-85204c54-3081b302") + checkExampleContent(t, pDir) + unmount(pDir) + err = os.Remove(pDir) + if err != nil { + t.Error(err) + } +} -- cgit v1.2.3