Skip to content

Commit

Permalink
Add test.bash
Browse files Browse the repository at this point in the history
...also adapt the cryptfs tests for 256 bit long keys
  • Loading branch information
rfjakob committed Oct 7, 2015
1 parent 2f970e1 commit 440abcb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions cryptfs/content_test.go
Expand Up @@ -19,7 +19,7 @@ func TestSplitRange(t *testing.T) {
testRange{65444, 54},
testRange{6654, 8945})

key := make([]byte, 16)
key := make([]byte, KEY_LEN)
f := NewCryptFS(key, true)

for _, r := range ranges {
Expand All @@ -42,7 +42,7 @@ func TestCiphertextRange(t *testing.T) {
testRange{65444, 54},
testRange{6654, 8945})

key := make([]byte, 16)
key := make([]byte, KEY_LEN)
f := NewCryptFS(key, true)

for _, r := range ranges {
Expand All @@ -60,7 +60,7 @@ func TestCiphertextRange(t *testing.T) {
}

func TestBlockNo(t *testing.T) {
key := make([]byte, 16)
key := make([]byte, KEY_LEN)
f := NewCryptFS(key, true)

b := f.BlockNoCipherOff(788)
Expand Down
4 changes: 2 additions & 2 deletions cryptfs/names_test.go
Expand Up @@ -11,7 +11,7 @@ func TestTranslatePath(t *testing.T) {
s = append(s, "foo12312312312312312313123123123")
s = append(s, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")

key := make([]byte, 16)
key := make([]byte, KEY_LEN)
fs := NewCryptFS(key, true)

for _, n := range s {
Expand All @@ -33,7 +33,7 @@ func TestPad16(t *testing.T) {
s = append(s, []byte("12345678901234567"))
s = append(s, []byte("12345678901234567abcdefg"))

key := make([]byte, 16)
key := make([]byte, KEY_LEN)
fs := NewCryptFS(key, true)

for i := range s {
Expand Down
11 changes: 11 additions & 0 deletions test.bash
@@ -0,0 +1,11 @@
#!/bin/bash

set -eux

cd cryptfs
go build
go test

cd ../gocryptfs_main
go build
go test

0 comments on commit 440abcb

Please sign in to comment.