-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_access.go
91 lines (71 loc) · 2.33 KB
/
test_access.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package app
import (
"testing"
"github.com/CosmWasm/wasmd/x/wasm"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
wasm08 "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper"
ratelimitkeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper"
tfmdKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
)
type TestSupport struct {
tb testing.TB
app *ComposableApp
}
func NewTestSupport(tb testing.TB, app *ComposableApp) *TestSupport {
tb.Helper()
return &TestSupport{tb: tb, app: app}
}
func (s TestSupport) IBCKeeper() *ibckeeper.Keeper {
return s.app.IBCKeeper
}
func (s TestSupport) AppCodec() codec.Codec {
return s.app.appCodec
}
func (s TestSupport) ScopeIBCKeeper() capabilitykeeper.ScopedKeeper {
return s.app.ScopedIBCKeeper
}
func (s TestSupport) ScopedTransferKeeper() capabilitykeeper.ScopedKeeper {
return s.app.ScopedTransferKeeper
}
func (s TestSupport) StakingKeeper() *stakingkeeper.Keeper {
return s.app.StakingKeeper
}
func (s TestSupport) AccountKeeper() authkeeper.AccountKeeper {
return s.app.AccountKeeper
}
func (s TestSupport) BankKeeper() bankkeeper.Keeper {
return s.app.BankKeeper
}
func (s TestSupport) GovKeeper() govkeeper.Keeper {
return s.app.GovKeeper
}
func (s TestSupport) TransferKeeper() ibctransferkeeper.Keeper {
return s.app.TransferKeeper
}
func (s TestSupport) Wasm08Keeper() wasm08.Keeper {
return s.app.Wasm08Keeper
}
func (s TestSupport) WasmdKeeper() wasm.Keeper {
return s.app.WasmKeeper
}
func (s TestSupport) GetBaseApp() *baseapp.BaseApp {
return s.app.BaseApp
}
func (s TestSupport) GetTxConfig() client.TxConfig {
return s.app.GetTxConfig()
}
func (s TestSupport) TransferMiddleware() tfmdKeeper.Keeper {
return s.app.TransferMiddlewareKeeper
}
func (s TestSupport) RateLimit() ratelimitkeeper.Keeper {
return s.app.RatelimitKeeper
}