Fix TestSectorStore

This commit is contained in:
Łukasz Magiera 2019-11-07 00:50:37 +01:00
parent 74ea4d71c5
commit cfac6f3272

View File

@ -3,6 +3,7 @@ package sector
import (
"context"
"fmt"
"github.com/filecoin-project/lotus/lib/padreader"
"io"
"math/rand"
"testing"
@ -74,7 +75,9 @@ func TestSectorStore(t *testing.T) {
store := NewStore(sb, ds, tktFn)
pr := io.LimitReader(rand.New(rand.NewSource(17)), 300)
sid, err := store.AddPiece("a", 300, pr, 1)
pr, n := padreader.New(pr, 300)
sid, err := store.AddPiece("a", n, pr, 1)
if err != nil {
t.Fatal(err)
}