Merge PR #6626: Remove viper from genutil tests

This commit is contained in:
Jonathan Gimeno 2020-07-07 20:19:32 +02:00 committed by GitHub
parent 86243f6a8c
commit c41b787e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)