summaryrefslogtreecommitdiff
path: root/tests/reverse/correctness_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-08 20:57:38 +0200
committerJakob Unterwurzacher2016-10-08 20:57:38 +0200
commitf054353bd3b05ab0d3d024ec8fa809bc5fed1d08 (patch)
treed5dfcccc3035e552449c4796207920fd4f1275e4 /tests/reverse/correctness_test.go
parentdde4a66454107709a7309ca5047ceb0ecf3c0b9f (diff)
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.
Diffstat (limited to 'tests/reverse/correctness_test.go')
-rw-r--r--tests/reverse/correctness_test.go15
1 files changed, 15 insertions, 0 deletions
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")
+ }
+}