lotus/itests/cli_test.go

28 lines
1.1 KiB
Go
Raw Permalink Normal View History

2022-08-29 14:25:30 +00:00
// stm: #integration
2021-05-17 12:28:09 +00:00
package itests
import (
"os"
"testing"
"time"
"github.com/filecoin-project/lotus/cli/clicommands"
2021-06-18 18:45:29 +00:00
"github.com/filecoin-project/lotus/itests/kit"
2021-05-17 12:28:09 +00:00
)
// TestClient does a basic test to exercise the client CLI commands.
func TestClient(t *testing.T) {
2021-12-13 12:41:04 +00:00
//stm: @CHAIN_SYNCER_LOAD_GENESIS_001, @CHAIN_SYNCER_FETCH_TIPSET_001,
//stm: @CHAIN_SYNCER_START_001, @CHAIN_SYNCER_SYNC_001, @BLOCKCHAIN_BEACON_VALIDATE_BLOCK_VALUES_01
//stm: @CHAIN_SYNCER_COLLECT_CHAIN_001, @CHAIN_SYNCER_COLLECT_HEADERS_001, @CHAIN_SYNCER_VALIDATE_TIPSET_001
//stm: @CHAIN_SYNCER_NEW_PEER_HEAD_001, @CHAIN_SYNCER_VALIDATE_MESSAGE_META_001, @CHAIN_SYNCER_STOP_001
2021-12-14 10:33:33 +00:00
//stm: @CHAIN_INCOMING_HANDLE_INCOMING_BLOCKS_001, @CHAIN_INCOMING_VALIDATE_BLOCK_PUBSUB_001, @CHAIN_INCOMING_VALIDATE_MESSAGE_PUBSUB_001
2021-05-17 12:28:09 +00:00
_ = os.Setenv("BELLMAN_NO_GPU", "1")
2021-06-18 18:45:29 +00:00
kit.QuietMiningLogs()
2021-05-17 12:28:09 +00:00
2021-06-14 10:07:50 +00:00
blockTime := 5 * time.Millisecond
2021-06-18 18:45:29 +00:00
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC())
2021-06-14 10:07:50 +00:00
ens.InterconnectAll().BeginMining(blockTime)
kit.RunClientTest(t, clicommands.Commands, client)
2021-05-17 12:28:09 +00:00
}