@@ -23,9 +23,10 @@ type KeeperTestSuite struct {
23
23
suite.Suite
24
24
ctx sdk.Context
25
25
26
- app * simapp.SimApp
27
- keeper keeper.Keeper
28
- impl internal.Keeper
26
+ bankKeeper foundation.BankKeeper
27
+ keeper keeper.Keeper
28
+ impl internal.Keeper
29
+
29
30
queryServer foundation.QueryServer
30
31
msgServer foundation.MsgServer
31
32
proposalHandler govtypes.Handler
@@ -54,18 +55,19 @@ func newMsgCreateDog(name string) sdk.Msg {
54
55
55
56
func (s * KeeperTestSuite ) SetupTest () {
56
57
checkTx := false
57
- s . app = simapp .Setup (checkTx )
58
- testdata .RegisterInterfaces (s . app .InterfaceRegistry ())
59
- testdata .RegisterMsgServer (s . app .MsgServiceRouter (), testdata.MsgServerImpl {})
58
+ app : = simapp .Setup (checkTx )
59
+ testdata .RegisterInterfaces (app .InterfaceRegistry ())
60
+ testdata .RegisterMsgServer (app .MsgServiceRouter (), testdata.MsgServerImpl {})
60
61
61
- s .ctx = s .app .BaseApp .NewContext (checkTx , tmproto.Header {})
62
- s .keeper = s .app .FoundationKeeper
62
+ s .ctx = app .BaseApp .NewContext (checkTx , tmproto.Header {})
63
+ s .bankKeeper = app .BankKeeper
64
+ s .keeper = app .FoundationKeeper
63
65
s .impl = internal .NewKeeper (
64
- s . app .AppCodec (),
65
- s . app .GetKey (foundation .ModuleName ),
66
- s . app .MsgServiceRouter (),
67
- s . app .AccountKeeper ,
68
- s . app .BankKeeper ,
66
+ app .AppCodec (),
67
+ app .GetKey (foundation .ModuleName ),
68
+ app .MsgServiceRouter (),
69
+ app .AccountKeeper ,
70
+ app .BankKeeper ,
69
71
authtypes .FeeCollectorName ,
70
72
foundation .DefaultConfig (),
71
73
foundation .DefaultAuthority ().String (),
@@ -106,14 +108,14 @@ func (s *KeeperTestSuite) SetupTest() {
106
108
s .Require ().NoError (err )
107
109
s .impl .SetFoundationInfo (s .ctx , info )
108
110
109
- s .balance = sdk .NewInt (1000000 )
111
+ s .balance = sdk .NewInt (987654321 )
110
112
s .impl .SetPool (s .ctx , foundation.Pool {
111
113
Treasury : sdk .NewDecCoinsFromCoins (sdk .NewCoin (sdk .DefaultBondDenom , s .balance )),
112
114
})
113
115
holders := []sdk.AccAddress {
114
116
s .stranger ,
115
- s . app .AccountKeeper .GetModuleAccount (s .ctx , foundation .TreasuryName ).GetAddress (),
116
- s . app .AccountKeeper .GetModuleAccount (s .ctx , authtypes .FeeCollectorName ).GetAddress (),
117
+ app .AccountKeeper .GetModuleAccount (s .ctx , foundation .TreasuryName ).GetAddress (),
118
+ app .AccountKeeper .GetModuleAccount (s .ctx , authtypes .FeeCollectorName ).GetAddress (),
117
119
}
118
120
for _ , holder := range holders {
119
121
amount := sdk .NewCoins (sdk .NewCoin (sdk .DefaultBondDenom , s .balance ))
@@ -123,11 +125,11 @@ func (s *KeeperTestSuite) SetupTest() {
123
125
// because x/bank already has dependency on x/mint, and we must have dependency
124
126
// on x/bank, it's OK to use x/mint here.
125
127
minterName := minttypes .ModuleName
126
- err := s . app .BankKeeper .MintCoins (s .ctx , minterName , amount )
128
+ err := app .BankKeeper .MintCoins (s .ctx , minterName , amount )
127
129
s .Require ().NoError (err )
128
130
129
- minter := s . app .AccountKeeper .GetModuleAccount (s .ctx , minterName ).GetAddress ()
130
- err = s . app .BankKeeper .SendCoins (s .ctx , minter , holder , amount )
131
+ minter := app .AccountKeeper .GetModuleAccount (s .ctx , minterName ).GetAddress ()
132
+ err = app .BankKeeper .SendCoins (s .ctx , minter , holder , amount )
131
133
s .Require ().NoError (err )
132
134
}
133
135
0 commit comments