diff --git a/common/header_test.go b/common/header_test.go index a1cd4b80de8ee81735c4c12d7ea1aa8e8bc3817c..3b01d502fc9788f9c3f2212d6718aad3ec5cc89a 100644 --- a/common/header_test.go +++ b/common/header_test.go @@ -34,7 +34,7 @@ func TestHeaderPrint(t *testing.T) { unsafe.Offsetof(header.RangeCapacity), unsafe.Sizeof(header.RangeCapacity), unsafe.Offsetof(header.RangeCoverage), unsafe.Sizeof(header.RangeCoverage), unsafe.Offsetof(header.HashOffset), unsafe.Sizeof(header.HashOffset), - unsafe.Offsetof(header.DataCount), unsafe.Sizeof(header.DataCount), + unsafe.Offsetof(header.DataEndPoint), unsafe.Sizeof(header.DataEndPoint), unsafe.Offsetof(header.RecycleOffset), unsafe.Sizeof(header.RecycleOffset), unsafe.Offsetof(header.Reserved), unsafe.Sizeof(header.Reserved)) } diff --git a/context.go b/context.go index 9ed15a0e75ddb2c67f99c1e6f60b8c1e17b28f9d..1e94a630eee9dc7a0df6018efc472d3dd680462f 100644 --- a/context.go +++ b/context.go @@ -12,7 +12,7 @@ import ( ) var ( - debugPrint bool = opt.DebugPrint + debugPrint = opt.DebugPrint ) type storageContext struct { diff --git a/storage/yottadisk_test.go b/storage/yottadisk_test.go index 1d6f6469f0679ebb96e7fdeb126226c26e233a46..f184b31482799e25b2d91cd8e686976b52a8e991 100644 --- a/storage/yottadisk_test.go +++ b/storage/yottadisk_test.go @@ -46,7 +46,6 @@ func TestValidateYottaDiskWithFileStorage(t *testing.T) { if err != nil { t.Fatal(err) } - defer yd.Close() yd.WriteData(0, []byte{0}) yd.WriteData(1, []byte{1}) @@ -58,7 +57,7 @@ func TestValidateYottaDiskWithFileStorage(t *testing.T) { } defer ydRef1.Close() - if reflect.DeepEqual(yd.meta, ydRef1.meta) { + if !reflect.DeepEqual(yd.meta, ydRef1.meta) { t.Fatal() }