refactor: clean-up test helpers and tmcli (#13805)
This commit is contained in:
@@ -5,8 +5,6 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
tmcli "github.com/tendermint/tendermint/libs/cli"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@@ -52,7 +50,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error {
|
||||
cmd.Println(conf.ChainID)
|
||||
case flags.FlagKeyringBackend:
|
||||
cmd.Println(conf.KeyringBackend)
|
||||
case tmcli.OutputFlag:
|
||||
case flags.FlagOutput:
|
||||
cmd.Println(conf.Output)
|
||||
case flags.FlagNode:
|
||||
cmd.Println(conf.Node)
|
||||
@@ -72,7 +70,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error {
|
||||
conf.SetChainID(value)
|
||||
case flags.FlagKeyringBackend:
|
||||
conf.SetKeyringBackend(value)
|
||||
case tmcli.OutputFlag:
|
||||
case flags.FlagOutput:
|
||||
conf.SetOutput(value)
|
||||
case flags.FlagNode:
|
||||
conf.SetNode(value)
|
||||
|
||||
@@ -76,7 +76,9 @@ const (
|
||||
FlagReverse = "reverse"
|
||||
FlagTip = "tip"
|
||||
FlagAux = "aux"
|
||||
FlagOutput = tmcli.OutputFlag
|
||||
// FlagOutput is the flag to set the output format.
|
||||
// This differs from FlagOutputDocument that is used to set the output file.
|
||||
FlagOutput = tmcli.OutputFlag
|
||||
|
||||
// Tendermint logging flags
|
||||
FlagLogLevel = "log_level"
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
tmcli "github.com/tendermint/tendermint/libs/cli"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@@ -59,7 +58,7 @@ func ValidatorCommand() *cobra.Command {
|
||||
}
|
||||
|
||||
cmd.Flags().String(flags.FlagNode, "tcp://localhost:26657", "<host>:<port> to Tendermint RPC interface for this chain")
|
||||
cmd.Flags().StringP(tmcli.OutputFlag, "o", "text", "Output format (text|json)")
|
||||
cmd.Flags().StringP(flags.FlagOutput, "o", "text", "Output format (text|json)")
|
||||
cmd.Flags().Int(flags.FlagPage, query.DefaultPage, "Query a specific page of paginated results")
|
||||
cmd.Flags().Int(flags.FlagLimit, 100, "Query number of results returned per page")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user