-
Notifications
You must be signed in to change notification settings - Fork 101
/
suite.go
34 lines (26 loc) · 904 Bytes
/
suite.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
package testsuite
import (
"time"
"github.com/stretchr/testify/suite"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
tmtypes "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/regen-network/regen-ledger/v5/app"
)
type UpgradeTestSuite struct {
suite.Suite
App *app.RegenApp
Ctx sdk.Context
QueryHelper *baseapp.QueryServiceTestHelper
TestAccs []sdk.AccAddress
}
// Setup sets up basic environment for suite (App, Ctx, and test accounts)
func (s *UpgradeTestSuite) Setup() {
s.App = NewAppWithCustomOptions(s.T(), false, DefaultOptions())
s.Ctx = s.App.BaseApp.NewContext(false, tmtypes.Header{Height: 1, ChainID: "regen-1", Time: time.Now().UTC()})
s.QueryHelper = &baseapp.QueryServiceTestHelper{
GRPCQueryRouter: s.App.GRPCQueryRouter(),
Ctx: s.Ctx,
}
s.TestAccs = CreateRandomAccounts(3)
}