Skip to content

Commit

Permalink
refactor: clean-up test helpers and tmcli (#13805)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 9, 2022
1 parent 76be730 commit 4f7d9ea
Show file tree
Hide file tree
Showing 36 changed files with 453 additions and 582 deletions.
6 changes: 2 additions & 4 deletions client/config/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion client/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions client/rpc/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")

Expand Down
118 changes: 0 additions & 118 deletions tests/e2e/auth/helpers.go

This file was deleted.

Loading

0 comments on commit 4f7d9ea

Please sign in to comment.