Browse Source

fix tests

pull/1427/head
Chris Lu 4 years ago
parent
commit
8c9e6eaacd
  1. 2
      weed/filer2/filechunks.go
  2. 2
      weed/filer2/filechunks_test.go

2
weed/filer2/filechunks.go

@ -143,7 +143,7 @@ func ViewFromVisibleIntervals(visibles []VisibleInterval, offset int64, size int
FileId: chunk.fileId,
Offset: chunkStart-chunk.start,
Size: uint64(chunkStop - chunkStart),
LogicOffset: chunk.start,
LogicOffset: chunkStart,
ChunkSize: chunk.chunkSize,
CipherKey: chunk.cipherKey,
IsGzipped: chunk.isGzipped,

2
weed/filer2/filechunks_test.go

@ -290,7 +290,7 @@ func TestChunksReading(t *testing.T) {
Size: 400,
Expected: []*ChunkView{
{Offset: 0, Size: 200, FileId: "asdf", LogicOffset: 0},
// {Offset: 0, Size: 150, FileId: "xxxx"}, // missing intervals should not happen
{Offset: 0, Size: 150, FileId: "xxxx", LogicOffset: 250},
},
},
// case 5: updates overwrite full chunks

Loading…
Cancel
Save