cosmos-sdk/client/keys/root_test.go
Alessio Treglia 415eab7a56
Create new generic keyring constructor: NewKeyring (#5547)
Remove other convenience constructors:
 * Remove NewKeyBaseFromHomeFlag
 * Remove NewKeyringFromDir
 * Remove NewKeyringFromHomeFlag
2020-01-22 17:54:56 +00:00

26 lines
480 B
Go

package keys
import (
"os"
"testing"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/crypto/keys"
)
func TestCommands(t *testing.T) {
rootCommands := Commands()
assert.NotNil(t, rootCommands)
// Commands are registered
assert.Equal(t, 11, len(rootCommands.Commands()))
}
func TestMain(m *testing.M) {
viper.Set(flags.FlagKeyringBackend, keys.BackendTest)
os.Exit(m.Run())
}