itests: Print API info env vars in ThroughRPC tests
This commit is contained in:
parent
6675aec686
commit
7fa84518c8
@ -30,23 +30,14 @@ func TestCCUpgrade(t *testing.T) {
|
|||||||
//stm: @MINER_SECTOR_LIST_001
|
//stm: @MINER_SECTOR_LIST_001
|
||||||
kit.QuietMiningLogs()
|
kit.QuietMiningLogs()
|
||||||
|
|
||||||
for _, height := range []abi.ChainEpoch{
|
runTestCCUpgrade(t)
|
||||||
-1, // before
|
|
||||||
162, // while sealing
|
|
||||||
560, // after upgrade deal
|
|
||||||
} {
|
|
||||||
height := height // make linters happy by copying
|
|
||||||
t.Run(fmt.Sprintf("upgrade-%d", height), func(t *testing.T) {
|
|
||||||
runTestCCUpgrade(t)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func runTestCCUpgrade(t *testing.T) *kit.TestFullNode {
|
func runTestCCUpgrade(t *testing.T) *kit.TestFullNode {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
blockTime := 1 * time.Millisecond
|
blockTime := 1 * time.Millisecond
|
||||||
|
|
||||||
client, miner, ens := kit.EnsembleMinimal(t, kit.GenesisNetworkVersion(network.Version15))
|
client, miner, ens := kit.EnsembleMinimal(t, kit.GenesisNetworkVersion(network.Version15), kit.ThroughRPC())
|
||||||
ens.InterconnectAll().BeginMiningMustPost(blockTime)
|
ens.InterconnectAll().BeginMiningMustPost(blockTime)
|
||||||
|
|
||||||
maddr, err := miner.ActorAddress(ctx)
|
maddr, err := miner.ActorAddress(ctx)
|
||||||
|
@ -39,6 +39,7 @@ func fullRpc(t *testing.T, f *TestFullNode) *TestFullNode {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
srv, maddr := CreateRPCServer(t, handler, l)
|
srv, maddr := CreateRPCServer(t, handler, l)
|
||||||
|
fmt.Printf("FULLNODE RPC ENV FOR CLI DEBUGGING `export FULLNODE_API_INFO=%s`\n", "ws://"+srv.Listener.Addr().String())
|
||||||
|
|
||||||
cl, stop, err := client.NewFullNodeRPCV1(context.Background(), "ws://"+srv.Listener.Addr().String()+"/rpc/v1", nil)
|
cl, stop, err := client.NewFullNodeRPCV1(context.Background(), "ws://"+srv.Listener.Addr().String()+"/rpc/v1", nil)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
@ -54,7 +55,9 @@ func minerRpc(t *testing.T, m *TestMiner) *TestMiner {
|
|||||||
|
|
||||||
srv, maddr := CreateRPCServer(t, handler, m.RemoteListener)
|
srv, maddr := CreateRPCServer(t, handler, m.RemoteListener)
|
||||||
|
|
||||||
fmt.Println("creating RPC server for", m.ActorAddr, "at: ", srv.Listener.Addr().String())
|
fmt.Printf("creating RPC server for %s at %s\n", m.ActorAddr, srv.Listener.Addr().String())
|
||||||
|
fmt.Printf("SP RPC ENV FOR CLI DEBUGGING `export STORAGE_API_INFO=%s`\n", "ws://"+srv.Listener.Addr().String())
|
||||||
|
|
||||||
url := "ws://" + srv.Listener.Addr().String() + "/rpc/v0"
|
url := "ws://" + srv.Listener.Addr().String() + "/rpc/v0"
|
||||||
cl, stop, err := client.NewStorageMinerRPCV0(context.Background(), url, nil)
|
cl, stop, err := client.NewStorageMinerRPCV0(context.Background(), url, nil)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user