aboutsummaryrefslogtreecommitdiff
path: root/tests/reverse/ctlsock_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-04-02 18:32:30 +0200
committerJakob Unterwurzacher2018-04-02 18:32:30 +0200
commitb6c8960b01f9e5366814b0dada57a0b1e6a031d9 (patch)
tree6a65255c30c7bcd086523fd4e0970d3b59b230de /tests/reverse/ctlsock_test.go
parente6caf56ea4ab10e747aa5dfc0a768cb8176ebe6a (diff)
fsck: clean up log output
Make sure we get only 1 warning output per problem. Also, add new corruption types to broken_fs_v1.4.
Diffstat (limited to 'tests/reverse/ctlsock_test.go')
-rw-r--r--tests/reverse/ctlsock_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/reverse/ctlsock_test.go b/tests/reverse/ctlsock_test.go
index d60fbde..6ccc724 100644
--- a/tests/reverse/ctlsock_test.go
+++ b/tests/reverse/ctlsock_test.go
@@ -2,6 +2,7 @@ package reverse_test
import (
"io/ioutil"
+ "syscall"
"testing"
"github.com/rfjakob/gocryptfs/internal/ctlsock"
@@ -58,12 +59,12 @@ func TestCtlSockPathOps(t *testing.T) {
// Check that we do not mix up information for different directories.
req = ctlsock.RequestStruct{DecryptPath: "gocryptfs.longname.y6rxCn6Id8hIZL2t_STpdLZpu-aE2HpprJR25xD60mk="}
response = test_helpers.QueryCtlSock(t, sock, req)
- if response.ErrNo != -1 {
+ if response.ErrNo != int32(syscall.ENOENT) {
t.Errorf("File should not exist: ErrNo=%d ErrText=%s", response.ErrNo, response.ErrText)
}
req = ctlsock.RequestStruct{DecryptPath: "v6puXntoQOk7Mhl8zJ4Idg==/gocryptfs.longname.ZQCAoi5li3xvDZRO8McBV0L_kzJc4IcAOEzuW-2S1Y4="}
response = test_helpers.QueryCtlSock(t, sock, req)
- if response.ErrNo != -1 {
+ if response.ErrNo != int32(syscall.ENOENT) {
t.Errorf("File should not exist: ErrNo=%d ErrText=%s", response.ErrNo, response.ErrText)
}
}