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

View File

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