2021-05-17 12:28:09 +00:00
|
|
|
package itests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/filecoin-project/lotus/cli"
|
2021-06-14 10:07:50 +00:00
|
|
|
"github.com/filecoin-project/lotus/itests/kit2"
|
2021-05-17 12:28:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// TestClient does a basic test to exercise the client CLI commands.
|
|
|
|
func TestClient(t *testing.T) {
|
|
|
|
_ = os.Setenv("BELLMAN_NO_GPU", "1")
|
2021-06-14 10:07:50 +00:00
|
|
|
kit2.QuietMiningLogs()
|
2021-05-17 12:28:09 +00:00
|
|
|
|
2021-06-14 10:07:50 +00:00
|
|
|
blockTime := 5 * time.Millisecond
|
|
|
|
client, _, ens := kit2.EnsembleMinimal(t, kit2.MockProofs(), kit2.ThroughRPC())
|
|
|
|
ens.InterconnectAll().BeginMining(blockTime)
|
|
|
|
kit2.RunClientTest(t, cli.Commands, *client)
|
2021-05-17 12:28:09 +00:00
|
|
|
}
|