github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/client/keys/root_test.go (about) 1 package keys 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/spf13/viper" 8 "github.com/stretchr/testify/assert" 9 10 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/client/flags" 11 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/crypto/keys" 12 ) 13 14 func TestCommands(t *testing.T) { 15 rootCommands := Commands() 16 assert.NotNil(t, rootCommands) 17 18 // Commands are registered 19 assert.Equal(t, 11, len(rootCommands.Commands())) 20 } 21 22 func TestMain(m *testing.M) { 23 viper.Set(flags.FlagKeyringBackend, keys.BackendTest) 24 os.Exit(m.Run()) 25 }