forked from filecoin-project/boost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up tests on CI (filecoin-project#409)
* feat: speed up tests on CI * add configs for batch precommit and commit * dtypes for lotus ; mockProofs for dummydeal * remove lotus-artefacts * enable market v1 deals; split itest for market v1 in two circleci jobs * split itest for market v1 * fetch-params with boostx; remove lotus binary dep in circleci config.yml * use real proofs Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
- Loading branch information
Showing
18 changed files
with
1,031 additions
and
1,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ func main() { | |
commpCmd, | ||
generatecarCmd, | ||
marketCmd, | ||
fetchParamCmd, | ||
}, | ||
} | ||
app.Setup() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package itests | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/filecoin-project/boost/itests/framework" | ||
"github.com/filecoin-project/boost/testutil" | ||
"github.com/filecoin-project/go-state-types/abi" | ||
"github.com/filecoin-project/lotus/itests/kit" | ||
"github.com/google/uuid" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestDummydealOffline(t *testing.T) { | ||
ctx := context.Background() | ||
|
||
kit.QuietMiningLogs() | ||
framework.SetLogLevel() | ||
framework.SetPreCommitChallengeDelay(t, 5) | ||
f := framework.NewTestFramework(ctx, t) | ||
err := f.Start() | ||
require.NoError(t, err) | ||
defer f.Stop() | ||
|
||
err = f.AddClientProviderBalance(abi.NewTokenAmount(1e15)) | ||
require.NoError(t, err) | ||
|
||
// Create a CAR file | ||
tempdir := t.TempDir() | ||
randomFilepath, err := testutil.CreateRandomFile(tempdir, 5, 2000000) | ||
require.NoError(t, err) | ||
rootCid, carFilepath, err := testutil.CreateDenseCARv2(tempdir, randomFilepath) | ||
require.NoError(t, err) | ||
|
||
// make an offline deal | ||
offlineDealUuid := uuid.New() | ||
res, err := f.MakeDummyDeal(offlineDealUuid, carFilepath, rootCid, "", true) | ||
require.NoError(t, err) | ||
require.True(t, res.Accepted) | ||
res, err = f.Boost.BoostOfflineDealWithData(context.Background(), offlineDealUuid, carFilepath) | ||
require.NoError(t, err) | ||
require.True(t, res.Accepted) | ||
err = f.WaitForDealAddedToSector(offlineDealUuid) | ||
require.NoError(t, err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.