fix tests

This commit is contained in:
Anton Evangelatov 2021-06-01 11:45:34 +02:00
parent e4136b0d42
commit 0a79f49dc5
2 changed files with 12 additions and 10 deletions

View File

@ -5,6 +5,7 @@ import (
"testing" "testing"
"github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/go-state-types/network"
api "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
@ -58,9 +59,9 @@ func TestBasicPolicyMostConstrictiveSchedule(t *testing.T) {
Size: abi.PaddedPieceSize(1024), Size: abi.PaddedPieceSize(1024),
PieceCID: fakePieceCid(t), PieceCID: fakePieceCid(t),
}, },
DealInfo: &sealing.DealInfo{ DealInfo: &api.PieceDealInfo{
DealID: abi.DealID(42), DealID: abi.DealID(42),
DealSchedule: sealing.DealSchedule{ DealSchedule: api.DealSchedule{
StartEpoch: abi.ChainEpoch(70), StartEpoch: abi.ChainEpoch(70),
EndEpoch: abi.ChainEpoch(75), EndEpoch: abi.ChainEpoch(75),
}, },
@ -71,9 +72,9 @@ func TestBasicPolicyMostConstrictiveSchedule(t *testing.T) {
Size: abi.PaddedPieceSize(1024), Size: abi.PaddedPieceSize(1024),
PieceCID: fakePieceCid(t), PieceCID: fakePieceCid(t),
}, },
DealInfo: &sealing.DealInfo{ DealInfo: &api.PieceDealInfo{
DealID: abi.DealID(43), DealID: abi.DealID(43),
DealSchedule: sealing.DealSchedule{ DealSchedule: api.DealSchedule{
StartEpoch: abi.ChainEpoch(80), StartEpoch: abi.ChainEpoch(80),
EndEpoch: abi.ChainEpoch(100), EndEpoch: abi.ChainEpoch(100),
}, },
@ -98,9 +99,9 @@ func TestBasicPolicyIgnoresExistingScheduleIfExpired(t *testing.T) {
Size: abi.PaddedPieceSize(1024), Size: abi.PaddedPieceSize(1024),
PieceCID: fakePieceCid(t), PieceCID: fakePieceCid(t),
}, },
DealInfo: &sealing.DealInfo{ DealInfo: &api.PieceDealInfo{
DealID: abi.DealID(44), DealID: abi.DealID(44),
DealSchedule: sealing.DealSchedule{ DealSchedule: api.DealSchedule{
StartEpoch: abi.ChainEpoch(1), StartEpoch: abi.ChainEpoch(1),
EndEpoch: abi.ChainEpoch(10), EndEpoch: abi.ChainEpoch(10),
}, },
@ -125,9 +126,9 @@ func TestMissingDealIsIgnored(t *testing.T) {
Size: abi.PaddedPieceSize(1024), Size: abi.PaddedPieceSize(1024),
PieceCID: fakePieceCid(t), PieceCID: fakePieceCid(t),
}, },
DealInfo: &sealing.DealInfo{ DealInfo: &api.PieceDealInfo{
DealID: abi.DealID(44), DealID: abi.DealID(44),
DealSchedule: sealing.DealSchedule{ DealSchedule: api.DealSchedule{
StartEpoch: abi.ChainEpoch(1), StartEpoch: abi.ChainEpoch(1),
EndEpoch: abi.ChainEpoch(10), EndEpoch: abi.ChainEpoch(10),
}, },

View File

@ -10,6 +10,7 @@ import (
cborutil "github.com/filecoin-project/go-cbor-util" cborutil "github.com/filecoin-project/go-cbor-util"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
api "github.com/filecoin-project/lotus/api"
market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market" market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing" tutils "github.com/filecoin-project/specs-actors/v2/support/testing"
) )
@ -22,9 +23,9 @@ func TestSectorInfoSerialization(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
dealInfo := DealInfo{ dealInfo := api.PieceDealInfo{
DealID: d, DealID: d,
DealSchedule: DealSchedule{ DealSchedule: api.DealSchedule{
StartEpoch: 0, StartEpoch: 0,
EndEpoch: 100, EndEpoch: 100,
}, },