fix genesis tests
This commit is contained in:
parent
ade42e74b7
commit
514b3fba4e
|
@ -3,21 +3,23 @@ package app
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestToAccount(t *testing.T) {
|
func TestToAccount(t *testing.T) {
|
||||||
priv = crypto.GenPrivKeyEd25519()
|
priv := crypto.GenPrivKeyEd25519()
|
||||||
addr = priv.PubKey().Address()
|
addr := sdk.Address(priv.PubKey().Address())
|
||||||
authAcc := auth.NewBaseAccountWithAddress(addr)
|
authAcc := auth.NewBaseAccountWithAddress(addr)
|
||||||
genAcc := NewGenesisAccount(authAcc)
|
genAcc := NewGenesisAccount(&authAcc)
|
||||||
assert.Equal(t, authAcc, genAcc.ToAccount())
|
assert.Equal(t, authAcc, *genAcc.ToAccount())
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGaiaAppGenTx(t *testing.T) {
|
func TestGaiaAppGenTx(t *testing.T) {
|
||||||
cdc := MakeCodec()
|
cdc := MakeCodec()
|
||||||
|
_ = cdc
|
||||||
|
|
||||||
//TODO test that key overwrite flags work / no overwrites if set off
|
//TODO test that key overwrite flags work / no overwrites if set off
|
||||||
//TODO test validator created has provided pubkey
|
//TODO test validator created has provided pubkey
|
||||||
|
@ -26,6 +28,7 @@ func TestGaiaAppGenTx(t *testing.T) {
|
||||||
|
|
||||||
func TestGaiaAppGenState(t *testing.T) {
|
func TestGaiaAppGenState(t *testing.T) {
|
||||||
cdc := MakeCodec()
|
cdc := MakeCodec()
|
||||||
|
_ = cdc
|
||||||
|
|
||||||
// TODO test must provide at least genesis transaction
|
// TODO test must provide at least genesis transaction
|
||||||
// TODO test with both one and two genesis transactions:
|
// TODO test with both one and two genesis transactions:
|
||||||
|
|
Loading…
Reference in New Issue