Skip to content

Commit

Permalink
add check on returned missing cids
Browse files Browse the repository at this point in the history
  • Loading branch information
i-norden committed Oct 12, 2023
1 parent 88c1ae3 commit 6d7de6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions blockstore/blockstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func TestPutsThenGetManyBlock(t *testing.T) {
if !bytes.Equal(blocksFromBlockstore[2].RawData(), block4.RawData()) {
t.Fail()
}
if !bytes.Equal(missingCIDs[0].Bytes(), block3.Cid().Bytes()) {
t.Fail()
}
}

func TestCidv0v1Many(t *testing.T) {
Expand Down Expand Up @@ -168,6 +171,9 @@ func TestCidv0v1Many(t *testing.T) {
if !bytes.Equal(blocksFromBlockstore[2].RawData(), block4.RawData()) {
t.Fail()
}
if !bytes.Equal(missingCIDs[0].Bytes(), cid.NewCidV1(cid.DagProtobuf, block3.Cid().Hash()).Bytes()) {
t.Fail()
}
}

func TestPutThenGetSizeBlock(t *testing.T) {
Expand Down

0 comments on commit 6d7de6c

Please sign in to comment.