MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestFileHeader_Compact_Merge2

Function TestFileHeader_Compact_Merge2

internal/utils/bfs/file_header_test.go:193–220  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

191}
192
193func TestFileHeader_Compact_Merge2(t *testing.T) {
194 var header = &bfs.FileHeader{
195 Version: 1,
196 Status: 200,
197 BodyBlocks: []bfs.BlockInfo{
198 {
199 BFileOffsetFrom: 0,
200 BFileOffsetTo: 100,
201 OriginOffsetFrom: 200,
202 OriginOffsetTo: 300,
203 },
204 {
205 BFileOffsetFrom: 101,
206 BFileOffsetTo: 200,
207 OriginOffsetFrom: 301,
208 OriginOffsetTo: 400,
209 },
210 {
211 BFileOffsetFrom: 200,
212 BFileOffsetTo: 300,
213 OriginOffsetFrom: 400,
214 OriginOffsetTo: 500,
215 },
216 },
217 }
218 header.Compact()
219 logs.PrintAsJSON(header.BodyBlocks)
220}
221
222func TestFileHeader_Clone(t *testing.T) {
223 var a = assert.NewAssertion(t)

Callers

nothing calls this directly

Calls 1

CompactMethod · 0.45

Tested by

no test coverage detected