From f054353bd3b05ab0d3d024ec8fa809bc5fed1d08 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 8 Oct 2016 20:57:38 +0200 Subject: reverse: make gocryptfs.conf mapping plaintextnames-aware Only in plaintextnames-mode AND with the config file at the default location it will be mapped into the mountpoint. Also adds a test for that. --- tests/reverse/correctness_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/reverse/correctness_test.go') diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go index 40bd320..c75a1fd 100644 --- a/tests/reverse/correctness_test.go +++ b/tests/reverse/correctness_test.go @@ -1,6 +1,7 @@ package reverse_test import ( + "io/ioutil" "os" "testing" //"time" @@ -49,3 +50,17 @@ func TestSymlinks(t *testing.T) { t.Errorf("wrong symlink target: want=%q have=%q", target, actualTarget) } } + +// .gocryptfs.reverse.conf in the plaintext dir should be visible as +// gocryptfs.conf +func TestConfigMapping(t *testing.T) { + c := dirB + "/gocryptfs.conf" + test_helpers.VerifyExistence(c) + data, err := ioutil.ReadFile(c) + if err != nil { + t.Fatal(err) + } + if len(data) == 0 { + t.Errorf("empty file") + } +} -- cgit v1.2.3