lotus/itests/cli_test.go
2021-12-10 11:33:29 +01:00

27 lines
962 B
Go

//stm: #integration
package itests
import (
"os"
"testing"
"time"
"github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/itests/kit"
)
// TestClient does a basic test to exercise the client CLI commands.
func TestClient(t *testing.T) {
//stm: @BLOCKCHAIN_SYNCER_LOAD_GENESIS_001, @BLOCKCHAIN_SYNCER_FETCH_TIPSET_001,
//stm: @BLOCKCHAIN_SYNCER_START_001, @BLOCKCHAIN_SYNCER_SYNC_001, @BLOCKCHAIN_BEACON_VALIDATE_BLOCK_01
//stm: @BLOCKCHAIN_SYNCER_COLLECT_CHAIN_001, @BLOCKCHAIN_SYNCER_COLLECT_HEADERS_001, @BLOCKCHAIN_SYNCER_VALIDATE_TIPSET_001
//stm: @BLOCKCHAIN_SYNCER_NEW_PEER_HEAD_001, @BLOCKCHAIN_SYNCER_VALIDATE_MESSAGE_META_001, @BLOCKCHAIN_SYNCER_STOP_001
_ = os.Setenv("BELLMAN_NO_GPU", "1")
kit.QuietMiningLogs()
blockTime := 5 * time.Millisecond
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC())
ens.InterconnectAll().BeginMining(blockTime)
kit.RunClientTest(t, cli.Commands, client)
}