Fix tests broken by PlaintextNames addition
This commit is contained in:
parent
6db57b15c9
commit
28b3af12d1
@ -21,7 +21,7 @@ func TestSplitRange(t *testing.T) {
|
|||||||
testRange{6654, 8945})
|
testRange{6654, 8945})
|
||||||
|
|
||||||
key := make([]byte, KEY_LEN)
|
key := make([]byte, KEY_LEN)
|
||||||
f := NewCryptFS(key, true)
|
f := NewCryptFS(key, true, false)
|
||||||
|
|
||||||
for _, r := range ranges {
|
for _, r := range ranges {
|
||||||
parts := f.ExplodePlainRange(r.offset, r.length)
|
parts := f.ExplodePlainRange(r.offset, r.length)
|
||||||
@ -48,7 +48,7 @@ func TestCiphertextRange(t *testing.T) {
|
|||||||
testRange{6654, 8945})
|
testRange{6654, 8945})
|
||||||
|
|
||||||
key := make([]byte, KEY_LEN)
|
key := make([]byte, KEY_LEN)
|
||||||
f := NewCryptFS(key, true)
|
f := NewCryptFS(key, true, false)
|
||||||
|
|
||||||
for _, r := range ranges {
|
for _, r := range ranges {
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ func TestCiphertextRange(t *testing.T) {
|
|||||||
|
|
||||||
func TestBlockNo(t *testing.T) {
|
func TestBlockNo(t *testing.T) {
|
||||||
key := make([]byte, KEY_LEN)
|
key := make([]byte, KEY_LEN)
|
||||||
f := NewCryptFS(key, true)
|
f := NewCryptFS(key, true, false)
|
||||||
|
|
||||||
b := f.CipherOffToBlockNo(788)
|
b := f.CipherOffToBlockNo(788)
|
||||||
if b != 0 {
|
if b != 0 {
|
||||||
|
@ -12,7 +12,7 @@ func TestTranslatePath(t *testing.T) {
|
|||||||
s = append(s, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
|
s = append(s, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
|
||||||
|
|
||||||
key := make([]byte, KEY_LEN)
|
key := make([]byte, KEY_LEN)
|
||||||
fs := NewCryptFS(key, true)
|
fs := NewCryptFS(key, true, false)
|
||||||
|
|
||||||
for _, n := range s {
|
for _, n := range s {
|
||||||
c := fs.EncryptPath(n)
|
c := fs.EncryptPath(n)
|
||||||
@ -34,7 +34,7 @@ func TestPad16(t *testing.T) {
|
|||||||
s = append(s, []byte("12345678901234567abcdefg"))
|
s = append(s, []byte("12345678901234567abcdefg"))
|
||||||
|
|
||||||
key := make([]byte, KEY_LEN)
|
key := make([]byte, KEY_LEN)
|
||||||
fs := NewCryptFS(key, true)
|
fs := NewCryptFS(key, true, false)
|
||||||
|
|
||||||
for i := range s {
|
for i := range s {
|
||||||
orig := s[i]
|
orig := s[i]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user