github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/pkg/index/chunk_test.go (about)

     1  package index
     2  
     3  // import (
     4  // 	"strings"
     5  // 	"testing"
     6  // )
     7  
     8  // func Test_calculateCid(t *testing.T) {
     9  // 	r := strings.NewReader("hello world")
    10  // 	cid, err := calculateCid(r)
    11  // 	if err != nil {
    12  // 		t.Fatal(err)
    13  // 	}
    14  
    15  // 	if cid != "Qmf412jQZiuVUtdgnB36FXFX7xg5V6KEbSJ4dpQuhkLyfD" {
    16  // 		t.Fatal("wrong CID:", cid)
    17  // 	}
    18  // }