Merge PR #6626: Remove viper from genutil tests

This commit is contained in:
Jonathan Gimeno
2020-07-07 14:19:32 -04:00
committed by GitHub
parent 86243f6a8c
commit c41b787e06
+1 -6
View File
@@ -12,13 +12,11 @@ import (
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
abci_server "github.com/tendermint/tendermint/abci/server"
tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
tmcfg "github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
"github.com/cosmos/cosmos-sdk/server"
@@ -162,11 +160,8 @@ func TestStartStandAlone(t *testing.T) {
func TestInitNodeValidatorFiles(t *testing.T) {
home, cleanup := tests.NewTestCaseDir(t)
cfg, err := createDefaultTendermintConfig(home)
t.Cleanup(cleanup)
viper.Set(cli.HomeFlag, home)
viper.Set(flags.FlagName, "moniker")
cfg, err := tcmd.ParseConfig()
require.Nil(t, err)
nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(cfg)
require.Nil(t, err)
require.NotEqual(t, "", nodeID)