From 514b3fba4ebebfd609e28e357c2e8844bbe76e9a Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Thu, 26 Apr 2018 14:16:17 -0400 Subject: [PATCH] fix genesis tests --- cmd/gaia/app/genesis_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/gaia/app/genesis_test.go b/cmd/gaia/app/genesis_test.go index 94bcdd0df..03ff46e50 100644 --- a/cmd/gaia/app/genesis_test.go +++ b/cmd/gaia/app/genesis_test.go @@ -3,21 +3,23 @@ package app import ( "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/stretchr/testify/assert" crypto "github.com/tendermint/go-crypto" ) func TestToAccount(t *testing.T) { - priv = crypto.GenPrivKeyEd25519() - addr = priv.PubKey().Address() + priv := crypto.GenPrivKeyEd25519() + addr := sdk.Address(priv.PubKey().Address()) authAcc := auth.NewBaseAccountWithAddress(addr) - genAcc := NewGenesisAccount(authAcc) - assert.Equal(t, authAcc, genAcc.ToAccount()) + genAcc := NewGenesisAccount(&authAcc) + assert.Equal(t, authAcc, *genAcc.ToAccount()) } func TestGaiaAppGenTx(t *testing.T) { cdc := MakeCodec() + _ = cdc //TODO test that key overwrite flags work / no overwrites if set off //TODO test validator created has provided pubkey @@ -26,6 +28,7 @@ func TestGaiaAppGenTx(t *testing.T) { func TestGaiaAppGenState(t *testing.T) { cdc := MakeCodec() + _ = cdc // TODO test must provide at least genesis transaction // TODO test with both one and two genesis transactions: