Fix TestSectorStore
This commit is contained in:
parent
74ea4d71c5
commit
cfac6f3272
@ -3,6 +3,7 @@ package sector
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/filecoin-project/lotus/lib/padreader"
|
||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"testing"
|
"testing"
|
||||||
@ -74,7 +75,9 @@ func TestSectorStore(t *testing.T) {
|
|||||||
store := NewStore(sb, ds, tktFn)
|
store := NewStore(sb, ds, tktFn)
|
||||||
|
|
||||||
pr := io.LimitReader(rand.New(rand.NewSource(17)), 300)
|
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 {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user