fix tests
This commit is contained in:
parent
8f453eaa04
commit
2cbe5662d0
|
@ -128,18 +128,24 @@ func (keeper Keeper) activateVotingPeriod(ctx sdk.Context, proposal Proposal) {
|
||||||
// =====================================================
|
// =====================================================
|
||||||
// Procedures
|
// Procedures
|
||||||
|
|
||||||
|
var (
|
||||||
|
defaultMinDeposit int64 = 100
|
||||||
|
defaultMaxDepositPeriod int64 = 10000
|
||||||
|
defaultVotingPeriod int64 = 10000
|
||||||
|
)
|
||||||
|
|
||||||
// Gets procedure from store. TODO: move to global param store and allow for updating of this
|
// Gets procedure from store. TODO: move to global param store and allow for updating of this
|
||||||
func (keeper Keeper) GetDepositProcedure() DepositProcedure {
|
func (keeper Keeper) GetDepositProcedure() DepositProcedure {
|
||||||
return DepositProcedure{
|
return DepositProcedure{
|
||||||
MinDeposit: sdk.Coins{sdk.NewCoin("steak", 100)},
|
MinDeposit: sdk.Coins{sdk.NewCoin("steak", defaultMinDeposit)},
|
||||||
MaxDepositPeriod: 10000,
|
MaxDepositPeriod: defaultMaxDepositPeriod,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets procedure from store. TODO: move to global param store and allow for updating of this
|
// Gets procedure from store. TODO: move to global param store and allow for updating of this
|
||||||
func (keeper Keeper) GetVotingProcedure() VotingProcedure {
|
func (keeper Keeper) GetVotingProcedure() VotingProcedure {
|
||||||
return VotingProcedure{
|
return VotingProcedure{
|
||||||
VotingPeriod: 10000,
|
VotingPeriod: defaultVotingPeriod,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,13 @@ import (
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// overwrite defaults for testing
|
||||||
|
func init() {
|
||||||
|
defaultMinDeposit = 10
|
||||||
|
defaultMaxDepositPeriod = 200
|
||||||
|
defaultVotingPeriod = 200
|
||||||
|
}
|
||||||
|
|
||||||
func TestGetSetProposal(t *testing.T) {
|
func TestGetSetProposal(t *testing.T) {
|
||||||
mapp, keeper, _, _, _, _ := getMockApp(t, 0)
|
mapp, keeper, _, _, _, _ := getMockApp(t, 0)
|
||||||
mapp.BeginBlock(abci.RequestBeginBlock{})
|
mapp.BeginBlock(abci.RequestBeginBlock{})
|
||||||
|
|
Loading…
Reference in New Issue