test: add more msig cli tests
This commit is contained in:
parent
9c99171cb8
commit
f74852bd73
@ -677,7 +677,7 @@ var msigAddProposeCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("sent add proposal in message: ", msgCid)
|
fmt.Fprintln(cctx.App.Writer, "sent add proposal in message: ", msgCid)
|
||||||
|
|
||||||
wait, err := api.StateWaitMsg(ctx, msgCid, build.MessageConfidence)
|
wait, err := api.StateWaitMsg(ctx, msgCid, build.MessageConfidence)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -68,10 +68,43 @@ func RunMultisigTest(t *testing.T, cmds []*lcli.Command, clientNode test.TestNod
|
|||||||
msigRobustAddr := parts[1]
|
msigRobustAddr := parts[1]
|
||||||
fmt.Println("msig robust address:", msigRobustAddr)
|
fmt.Println("msig robust address:", msigRobustAddr)
|
||||||
|
|
||||||
// msig inspect <msig>
|
// Propose to add a new address to the msig
|
||||||
cmd = []string{"msig", "inspect", msigRobustAddr}
|
// msig add-propose --from=<addr> <msig> <addr>
|
||||||
|
paramFrom := fmt.Sprintf("--from=%s", walletAddrs[0])
|
||||||
|
cmd = []string{
|
||||||
|
"msig", "add-propose",
|
||||||
|
paramFrom,
|
||||||
|
msigRobustAddr,
|
||||||
|
walletAddrs[3].String(),
|
||||||
|
}
|
||||||
out = clientCLI.runCmd(cmd)
|
out = clientCLI.runCmd(cmd)
|
||||||
fmt.Println(out)
|
fmt.Println(out)
|
||||||
|
|
||||||
|
// msig inspect <msig>
|
||||||
|
cmd = []string{"msig", "inspect", "--vesting", "--decode-params", msigRobustAddr}
|
||||||
|
out = clientCLI.runCmd(cmd)
|
||||||
|
fmt.Println(out)
|
||||||
|
|
||||||
|
// Expect correct balance
|
||||||
require.Regexp(t, regexp.MustCompile("Balance: 0.000000000000001 FIL"), out)
|
require.Regexp(t, regexp.MustCompile("Balance: 0.000000000000001 FIL"), out)
|
||||||
|
// Expect 1 transaction
|
||||||
|
require.Regexp(t, regexp.MustCompile(`Transactions:\s*1`), out)
|
||||||
|
// Expect transaction to be "AddSigner"
|
||||||
|
require.Regexp(t, regexp.MustCompile(`AddSigner`), out)
|
||||||
|
|
||||||
|
// Approve adding the new address
|
||||||
|
// msig add-approve --from=<addr> <msig> <addr> 0 <addr> false
|
||||||
|
txnID := "0"
|
||||||
|
paramFrom = fmt.Sprintf("--from=%s", walletAddrs[1])
|
||||||
|
cmd = []string{
|
||||||
|
"msig", "add-approve",
|
||||||
|
paramFrom,
|
||||||
|
msigRobustAddr,
|
||||||
|
walletAddrs[0].String(),
|
||||||
|
txnID,
|
||||||
|
walletAddrs[3].String(),
|
||||||
|
"false",
|
||||||
|
}
|
||||||
|
out = clientCLI.runCmd(cmd)
|
||||||
|
fmt.Println(out)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user