test: rename e2e tests (#13913)
This commit is contained in:
parent
fe34e5df32
commit
ce167a2074
@ -7,6 +7,7 @@ import (
|
||||
"crypto/sha256"
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -277,3 +278,16 @@ func (s *extSnapshotter) RestoreExtension(height uint64, format uint32, payloadR
|
||||
// finalize restoration
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetTempDir returns a writable temporary director for the test to use.
|
||||
func GetTempDir(t testing.TB) string {
|
||||
t.Helper()
|
||||
// os.MkDir() is used instead of testing.T.TempDir()
|
||||
// see https://github.com/cosmos/cosmos-sdk/pull/8475 and
|
||||
// https://github.com/cosmos/cosmos-sdk/pull/10341 for
|
||||
// this change's rationale.
|
||||
tempdir, err := os.MkdirTemp("", "")
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() { _ = os.RemoveAll(tempdir) })
|
||||
return tempdir
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func setupStore(t *testing.T) *snapshots.Store {
|
||||
store, err := snapshots.NewStore(db.NewMemDB(), t.TempDir())
|
||||
store, err := snapshots.NewStore(db.NewMemDB(), GetTempDir(t))
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = store.Save(1, 1, makeChunks([][]byte{
|
||||
@ -40,7 +40,7 @@ func setupStore(t *testing.T) *snapshots.Store {
|
||||
}
|
||||
|
||||
func TestNewStore(t *testing.T) {
|
||||
tempdir := t.TempDir()
|
||||
tempdir := GetTempDir(t)
|
||||
_, err := snapshots.NewStore(db.NewMemDB(), tempdir)
|
||||
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -13,8 +13,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 2
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -41,20 +41,19 @@ import (
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
s.Require().NoError(err)
|
||||
@ -83,12 +82,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIValidateSignatures() {
|
||||
func (s *E2ETestSuite) TestCLIValidateSignatures() {
|
||||
val := s.network.Validators[0]
|
||||
sendTokens := sdk.NewCoins(
|
||||
sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)),
|
||||
@ -124,7 +123,7 @@ func (s *IntegrationTestSuite) TestCLIValidateSignatures() {
|
||||
s.Require().EqualError(err, "signatures validation failed")
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLISignGenOnly() {
|
||||
func (s *E2ETestSuite) TestCLISignGenOnly() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
|
||||
@ -241,7 +240,7 @@ func (s *IntegrationTestSuite) TestCLISignGenOnly() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLISignBatch() {
|
||||
func (s *E2ETestSuite) TestCLISignBatch() {
|
||||
val := s.network.Validators[0]
|
||||
sendTokens := sdk.NewCoins(
|
||||
sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)),
|
||||
@ -328,7 +327,7 @@ func (s *IntegrationTestSuite) TestCLISignBatch() {
|
||||
s.Require().Equal(sigs[0].Sequence, seq1)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCliGetAccountAddressByID() {
|
||||
func (s *E2ETestSuite) TestCliGetAccountAddressByID() {
|
||||
require := s.Require()
|
||||
val1 := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
@ -372,7 +371,7 @@ func (s *IntegrationTestSuite) TestCliGetAccountAddressByID() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLISignAminoJSON() {
|
||||
func (s *E2ETestSuite) TestCLISignAminoJSON() {
|
||||
require := s.Require()
|
||||
val1 := s.network.Validators[0]
|
||||
txCfg := val1.ClientCtx.TxConfig
|
||||
@ -474,7 +473,7 @@ func checkSignatures(require *require.Assertions, txCfg client.TxConfig, output
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIQueryTxCmdByHash() {
|
||||
func (s *E2ETestSuite) TestCLIQueryTxCmdByHash() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
account2, err := val.ClientCtx.Keyring.Key("newAccount2")
|
||||
@ -546,7 +545,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByHash() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() {
|
||||
func (s *E2ETestSuite) TestCLIQueryTxCmdByEvents() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
account2, err := val.ClientCtx.Keyring.Key("newAccount2")
|
||||
@ -663,7 +662,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() {
|
||||
func (s *E2ETestSuite) TestCLIQueryTxsCmdByEvents() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
account2, err := val.ClientCtx.Keyring.Key("newAccount2")
|
||||
@ -736,7 +735,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLISendGenerateSignAndBroadcast() {
|
||||
func (s *E2ETestSuite) TestCLISendGenerateSignAndBroadcast() {
|
||||
val1 := s.network.Validators[0]
|
||||
|
||||
account, err := val1.ClientCtx.Keyring.Key("newAccount")
|
||||
@ -880,7 +879,7 @@ func (s *IntegrationTestSuite) TestCLISendGenerateSignAndBroadcast() {
|
||||
s.Require().NoError(err)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIMultisignInsufficientCosigners() {
|
||||
func (s *E2ETestSuite) TestCLIMultisignInsufficientCosigners() {
|
||||
val1 := s.network.Validators[0]
|
||||
|
||||
// Fetch account and a multisig info
|
||||
@ -943,7 +942,7 @@ func (s *IntegrationTestSuite) TestCLIMultisignInsufficientCosigners() {
|
||||
s.Require().Error(err)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIEncode() {
|
||||
func (s *E2ETestSuite) TestCLIEncode() {
|
||||
val1 := s.network.Validators[0]
|
||||
|
||||
sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))
|
||||
@ -975,7 +974,7 @@ func (s *IntegrationTestSuite) TestCLIEncode() {
|
||||
s.Require().Equal("deadbeef", txBuilder.GetTx().GetMemo())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() {
|
||||
func (s *E2ETestSuite) TestCLIMultisignSortSignatures() {
|
||||
val1 := s.network.Validators[0]
|
||||
|
||||
// Generate 2 accounts and a multisig.
|
||||
@ -1002,7 +1001,6 @@ func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() {
|
||||
s.Require().NoError(err)
|
||||
intialCoins := balRes.Balances
|
||||
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
// Send coins from validator to multisig.
|
||||
sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10)
|
||||
_, err = s.createBankMsg(
|
||||
@ -1083,7 +1081,7 @@ func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestSignWithMultisig() {
|
||||
func (s *E2ETestSuite) TestSignWithMultisig() {
|
||||
val1 := s.network.Validators[0]
|
||||
|
||||
// Generate a account for signing.
|
||||
@ -1125,7 +1123,7 @@ func (s *IntegrationTestSuite) TestSignWithMultisig() {
|
||||
s.Require().Contains(err.Error(), "error getting account from keybase")
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLIMultisign() {
|
||||
func (s *E2ETestSuite) TestCLIMultisign() {
|
||||
val1 := s.network.Validators[0]
|
||||
|
||||
// Generate 2 accounts and a multisig.
|
||||
@ -1219,7 +1217,7 @@ func (s *IntegrationTestSuite) TestCLIMultisign() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestSignBatchMultisig() {
|
||||
func (s *E2ETestSuite) TestSignBatchMultisig() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
// Fetch 2 accounts and a multisig.
|
||||
@ -1284,7 +1282,7 @@ func (s *IntegrationTestSuite) TestSignBatchMultisig() {
|
||||
s.Require().NoError(err)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestMultisignBatch() {
|
||||
func (s *E2ETestSuite) TestMultisignBatch() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
// Fetch 2 accounts and a multisig.
|
||||
@ -1368,7 +1366,7 @@ func (s *IntegrationTestSuite) TestMultisignBatch() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetAccountCmd() {
|
||||
func (s *E2ETestSuite) TestGetAccountCmd() {
|
||||
val := s.network.Validators[0]
|
||||
_, _, addr1 := testdata.KeyTestPubAddr()
|
||||
|
||||
@ -1407,7 +1405,7 @@ func (s *IntegrationTestSuite) TestGetAccountCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetAccountsCmd() {
|
||||
func (s *E2ETestSuite) TestGetAccountsCmd() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -1421,7 +1419,7 @@ func (s *IntegrationTestSuite) TestGetAccountsCmd() {
|
||||
s.Require().NotEmpty(res.Accounts)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() {
|
||||
func (s *E2ETestSuite) TestQueryModuleAccountByNameCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -1469,7 +1467,7 @@ func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryModuleAccountsCmd() {
|
||||
func (s *E2ETestSuite) TestQueryModuleAccountsCmd() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -1525,7 +1523,7 @@ func TestGetBroadcastCommandWithoutOfflineFlag(t *testing.T) {
|
||||
require.Contains(t, out.String(), "connect: connection refused")
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryParamsCmd() {
|
||||
func (s *E2ETestSuite) TestQueryParamsCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -1567,7 +1565,7 @@ func (s *IntegrationTestSuite) TestQueryParamsCmd() {
|
||||
// TestTxWithoutPublicKey makes sure sending a proto tx message without the
|
||||
// public key doesn't cause any error in the RPC layer (broadcast).
|
||||
// See https://github.com/cosmos/cosmos-sdk/issues/7585 for more details.
|
||||
func (s *IntegrationTestSuite) TestTxWithoutPublicKey() {
|
||||
func (s *E2ETestSuite) TestTxWithoutPublicKey() {
|
||||
val1 := s.network.Validators[0]
|
||||
txCfg := val1.ClientCtx.TxConfig
|
||||
|
||||
@ -1628,7 +1626,7 @@ func (s *IntegrationTestSuite) TestTxWithoutPublicKey() {
|
||||
// messages which has to be signed with 2 different keys. Sign and append the
|
||||
// signatures using the CLI with Amino signing mode. Finally, send the
|
||||
// transaction to the blockchain.
|
||||
func (s *IntegrationTestSuite) TestSignWithMultiSignersAminoJSON() {
|
||||
func (s *E2ETestSuite) TestSignWithMultiSignersAminoJSON() {
|
||||
require := s.Require()
|
||||
val0, val1 := s.network.Validators[0], s.network.Validators[1]
|
||||
val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val0.Moniker), sdk.NewInt(10))
|
||||
@ -1699,7 +1697,7 @@ func (s *IntegrationTestSuite) TestSignWithMultiSignersAminoJSON() {
|
||||
require.Equal(sdk.NewCoins(val0Coin, val1Coin), queryRes.Balances)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestAuxSigner() {
|
||||
func (s *E2ETestSuite) TestAuxSigner() {
|
||||
require := s.Require()
|
||||
val := s.network.Validators[0]
|
||||
val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10))
|
||||
@ -1755,7 +1753,7 @@ func (s *IntegrationTestSuite) TestAuxSigner() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestAuxToFeeWithTips() {
|
||||
func (s *E2ETestSuite) TestAuxToFeeWithTips() {
|
||||
// Skipping this test as it needs a simapp with the TipDecorator in post handler.
|
||||
s.T().Skip()
|
||||
|
||||
@ -2014,7 +2012,7 @@ func (s *IntegrationTestSuite) TestAuxToFeeWithTips() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddress, amount sdk.Coins, extraFlags ...string) (testutil.BufferWriter, error) {
|
||||
func (s *E2ETestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddress, amount sdk.Coins, extraFlags ...string) (testutil.BufferWriter, error) {
|
||||
flags := []string{
|
||||
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
||||
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync),
|
||||
@ -2026,7 +2024,7 @@ func (s *IntegrationTestSuite) createBankMsg(val *network.Validator, toAddr sdk.
|
||||
return clitestutil.MsgSendExec(val.ClientCtx, val.Address, toAddr, amount, flags...)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) getBalances(clientCtx client.Context, addr sdk.AccAddress, denom string) math.Int {
|
||||
func (s *E2ETestSuite) getBalances(clientCtx client.Context, addr sdk.AccAddress, denom string) math.Int {
|
||||
resp, err := clitestutil.QueryBalancesExec(clientCtx, addr)
|
||||
s.Require().NoError(err)
|
||||
|
||||
|
||||
@ -6,14 +6,14 @@ package testutil
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestEndToEndTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewEndToEndTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
@ -13,19 +13,19 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -33,12 +33,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewMsgCreateVestingAccountCmd() {
|
||||
func (s *E2ETestSuite) TestNewMsgCreateVestingAccountCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := map[string]struct {
|
||||
@ -145,7 +145,7 @@ func (s *IntegrationTestSuite) TestNewMsgCreateVestingAccountCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewMsgCreatePermanentLockedAccountCmd() {
|
||||
func (s *E2ETestSuite) TestNewMsgCreatePermanentLockedAccountCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := map[string]struct {
|
||||
@ -13,8 +13,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGrantGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryGrantGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[1]
|
||||
grantsURL := val.APIAddress + "/cosmos/authz/v1beta1/grants?granter=%s&grantee=%s&msg_type_url=%s"
|
||||
@ -81,7 +81,7 @@ func (s *IntegrationTestSuite) TestQueryGrantGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGrantsGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryGrantsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[1]
|
||||
grantsURL := val.APIAddress + "/cosmos/authz/v1beta1/grants?granter=%s&grantee=%s"
|
||||
@ -166,7 +166,7 @@ func (s *IntegrationTestSuite) TestQueryGrantsGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGranterGrantsGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryGranterGrantsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[1]
|
||||
require := s.Require()
|
||||
@ -217,7 +217,7 @@ func (s *IntegrationTestSuite) TestQueryGranterGrantsGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGranteeGrantsGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryGranteeGrantsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[1]
|
||||
require := s.Require()
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
authzclitestutil "github.com/cosmos/cosmos-sdk/x/authz/client/testutil"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryAuthorizations() {
|
||||
func (s *E2ETestSuite) TestQueryAuthorizations() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
grantee := s.grantee[0]
|
||||
@ -92,7 +92,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorizations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryAuthorization() {
|
||||
func (s *E2ETestSuite) TestQueryAuthorization() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
grantee := s.grantee[0]
|
||||
@ -193,7 +193,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGranterGrants() {
|
||||
func (s *E2ETestSuite) TestQueryGranterGrants() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
require := s.Require()
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
stakingcli "github.com/cosmos/cosmos-sdk/x/staking/client/cli"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
@ -34,12 +34,12 @@ type IntegrationTestSuite struct {
|
||||
grantee []sdk.AccAddress
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -127,7 +127,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(clitestutil.CheckTxCode(s.network, val.ClientCtx, response.TxHash, 0))
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) createAccount(uid string) sdk.AccAddress {
|
||||
func (s *E2ETestSuite) createAccount(uid string) sdk.AccAddress {
|
||||
val := s.network.Validators[0]
|
||||
// Create new account in the keyring.
|
||||
k, _, err := val.ClientCtx.Keyring.NewMnemonic(uid, keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1)
|
||||
@ -139,7 +139,7 @@ func (s *IntegrationTestSuite) createAccount(uid string) sdk.AccAddress {
|
||||
return addr
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) msgSendExec(grantee sdk.AccAddress) {
|
||||
func (s *E2ETestSuite) msgSendExec(grantee sdk.AccAddress) {
|
||||
val := s.network.Validators[0]
|
||||
// Send some funds to the new account.
|
||||
out, err := clitestutil.MsgSendExec(
|
||||
@ -155,8 +155,8 @@ func (s *IntegrationTestSuite) msgSendExec(grantee sdk.AccAddress) {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ var (
|
||||
typeMsgSubmitProposal = sdk.MsgTypeURL(&govv1.MsgSubmitProposal{})
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() {
|
||||
func (s *E2ETestSuite) TestCLITxGrantAuthorization() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
|
||||
@ -532,7 +532,7 @@ func execDelegate(val *network.Validator, args []string) (testutil.BufferWriter,
|
||||
return clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdRevokeAuthorizations() {
|
||||
func (s *E2ETestSuite) TestCmdRevokeAuthorizations() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
grantee := s.grantee[0]
|
||||
@ -682,7 +682,7 @@ func (s *IntegrationTestSuite) TestCmdRevokeAuthorizations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestExecAuthorizationWithExpiration() {
|
||||
func (s *E2ETestSuite) TestExecAuthorizationWithExpiration() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
tenSeconds := time.Now().Add(time.Second * time.Duration(10)).Unix()
|
||||
@ -725,7 +725,7 @@ func (s *IntegrationTestSuite) TestExecAuthorizationWithExpiration() {
|
||||
s.Require().NoError(clitestutil.CheckTxCode(s.network, clientCtx, response.TxHash, authz.ErrNoAuthorizationFound.ABCICode()))
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewExecGenericAuthorized() {
|
||||
func (s *E2ETestSuite) TestNewExecGenericAuthorized() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix()
|
||||
@ -828,7 +828,7 @@ func (s *IntegrationTestSuite) TestNewExecGenericAuthorized() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewExecGrantAuthorized() {
|
||||
func (s *E2ETestSuite) TestNewExecGrantAuthorized() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
grantee1 := s.grantee[2]
|
||||
@ -939,7 +939,7 @@ func (s *IntegrationTestSuite) TestNewExecGrantAuthorized() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestExecSendAuthzWithAllowList() {
|
||||
func (s *E2ETestSuite) TestExecSendAuthzWithAllowList() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[3]
|
||||
allowedAddr := s.grantee[4]
|
||||
@ -1029,7 +1029,7 @@ func (s *IntegrationTestSuite) TestExecSendAuthzWithAllowList() {
|
||||
s.Contains(out.String(), fmt.Sprintf("cannot send to %s address", notAllowedAddr))
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestExecDelegateAuthorization() {
|
||||
func (s *E2ETestSuite) TestExecDelegateAuthorization() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix()
|
||||
@ -1246,7 +1246,7 @@ func (s *IntegrationTestSuite) TestExecDelegateAuthorization() {
|
||||
s.Contains(out.String(), fmt.Sprintf("cannot delegate/undelegate to %s validator", val.ValAddress.String()))
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestExecUndelegateAuthorization() {
|
||||
func (s *E2ETestSuite) TestExecUndelegateAuthorization() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.grantee[0]
|
||||
twoHours := time.Now().Add(time.Minute * time.Duration(120)).Unix()
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewEndToEndTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
@ -14,7 +14,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
func (s *EndToEndTestSuite) TestTotalSupplyGRPCHandler() {
|
||||
func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -100,7 +100,7 @@ func (s *EndToEndTestSuite) TestTotalSupplyGRPCHandler() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestDenomMetadataGRPCHandler() {
|
||||
func (s *E2ETestSuite) TestDenomMetadataGRPCHandler() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -225,7 +225,7 @@ func (s *EndToEndTestSuite) TestDenomMetadataGRPCHandler() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestBalancesGRPCHandler() {
|
||||
func (s *E2ETestSuite) TestBalancesGRPCHandler() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -22,19 +22,19 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
type EndToEndTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewEndToEndTestSuite(cfg network.Config) *EndToEndTestSuite {
|
||||
return &EndToEndTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
genesisState := s.cfg.GenesisState
|
||||
var bankGenesis types.GenesisState
|
||||
@ -90,12 +90,12 @@ func (s *EndToEndTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestGetBalancesCmd() {
|
||||
func (s *E2ETestSuite) TestGetBalancesCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -166,7 +166,7 @@ func (s *EndToEndTestSuite) TestGetBalancesCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestGetCmdQueryTotalSupply() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryTotalSupply() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -238,7 +238,7 @@ func (s *EndToEndTestSuite) TestGetCmdQueryTotalSupply() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestGetCmdQueryDenomsMetadata() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryDenomsMetadata() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -365,7 +365,7 @@ func (s *EndToEndTestSuite) TestGetCmdQueryDenomsMetadata() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestNewSendTxCmdGenOnly() {
|
||||
func (s *E2ETestSuite) TestNewSendTxCmdGenOnly() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
clientCtx := val.ClientCtx
|
||||
@ -390,7 +390,7 @@ func (s *EndToEndTestSuite) TestNewSendTxCmdGenOnly() {
|
||||
s.Require().Equal([]sdk.Msg{types.NewMsgSend(from, to, amount)}, tx.GetMsgs())
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestNewSendTxCmdDryRun() {
|
||||
func (s *E2ETestSuite) TestNewSendTxCmdDryRun() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
clientCtx := val.ClientCtx
|
||||
@ -422,7 +422,7 @@ func (s *EndToEndTestSuite) TestNewSendTxCmdDryRun() {
|
||||
s.Require().Regexp("gas estimate: [0-9]+", string(out))
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestNewSendTxCmd() {
|
||||
func (s *E2ETestSuite) TestNewSendTxCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -524,7 +524,7 @@ func (s *EndToEndTestSuite) TestNewSendTxCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestNewMultiSendTxCmd() {
|
||||
func (s *E2ETestSuite) TestNewMultiSendTxCmd() {
|
||||
val := s.network.Validators[0]
|
||||
testAddr := sdk.AccAddress("cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5")
|
||||
|
||||
@ -8,13 +8,13 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/configurator"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
"github.com/cosmos/cosmos-sdk/types"
|
||||
qtypes "github.com/cosmos/cosmos-sdk/types/query"
|
||||
@ -22,7 +22,7 @@ import (
|
||||
_ "github.com/cosmos/cosmos-sdk/x/gov"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
@ -30,29 +30,18 @@ type IntegrationTestSuite struct {
|
||||
queryClient tmservice.ServiceClient
|
||||
}
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(IntegrationTestSuite))
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
suite.Run(t, new(E2ETestSuite))
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
appConfig := configurator.NewAppConfig(
|
||||
configurator.AuthModule(),
|
||||
configurator.ParamsModule(),
|
||||
configurator.BankModule(),
|
||||
configurator.GenutilModule(),
|
||||
configurator.StakingModule(),
|
||||
configurator.GovModule(),
|
||||
configurator.ConsensusModule(),
|
||||
configurator.TxModule())
|
||||
|
||||
cfg, err := network.DefaultConfigWithAppConfig(appConfig)
|
||||
s.NoError(err)
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
|
||||
s.cfg = cfg
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
s.Require().NoError(err)
|
||||
|
||||
@ -61,12 +50,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.queryClient = tmservice.NewServiceClient(s.network.Validators[0].ClientCtx)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryNodeInfo() {
|
||||
func (s *E2ETestSuite) TestQueryNodeInfo() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
res, err := s.queryClient.GetNodeInfo(context.Background(), &tmservice.GetNodeInfoRequest{})
|
||||
@ -80,7 +69,7 @@ func (s *IntegrationTestSuite) TestQueryNodeInfo() {
|
||||
s.Require().Equal(getInfoRes.ApplicationVersion.AppName, version.NewInfo().AppName)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQuerySyncing() {
|
||||
func (s *E2ETestSuite) TestQuerySyncing() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
_, err := s.queryClient.GetSyncing(context.Background(), &tmservice.GetSyncingRequest{})
|
||||
@ -92,7 +81,7 @@ func (s *IntegrationTestSuite) TestQuerySyncing() {
|
||||
s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &syncingRes))
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryLatestBlock() {
|
||||
func (s *E2ETestSuite) TestQueryLatestBlock() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
_, err := s.queryClient.GetLatestBlock(context.Background(), &tmservice.GetLatestBlockRequest{})
|
||||
@ -106,7 +95,7 @@ func (s *IntegrationTestSuite) TestQueryLatestBlock() {
|
||||
s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper")
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryBlockByHeight() {
|
||||
func (s *E2ETestSuite) TestQueryBlockByHeight() {
|
||||
val := s.network.Validators[0]
|
||||
_, err := s.queryClient.GetBlockByHeight(context.Background(), &tmservice.GetBlockByHeightRequest{Height: 1})
|
||||
s.Require().NoError(err)
|
||||
@ -118,7 +107,7 @@ func (s *IntegrationTestSuite) TestQueryBlockByHeight() {
|
||||
s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper")
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryLatestValidatorSet() {
|
||||
func (s *E2ETestSuite) TestQueryLatestValidatorSet() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
// nil pagination
|
||||
@ -153,7 +142,7 @@ func (s *IntegrationTestSuite) TestQueryLatestValidatorSet() {
|
||||
s.Require().Equal(validatorSetRes.Validators[0].PubKey, anyPub)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPC() {
|
||||
func (s *E2ETestSuite) TestLatestValidatorSet_GRPC() {
|
||||
vals := s.network.Validators
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -184,7 +173,7 @@ func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() {
|
||||
func (s *E2ETestSuite) TestLatestValidatorSet_GRPCGateway() {
|
||||
vals := s.network.Validators
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -216,7 +205,7 @@ func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() {
|
||||
func (s *E2ETestSuite) TestValidatorSetByHeight_GRPC() {
|
||||
vals := s.network.Validators
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -245,7 +234,7 @@ func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() {
|
||||
func (s *E2ETestSuite) TestValidatorSetByHeight_GRPCGateway() {
|
||||
vals := s.network.Validators
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -275,7 +264,7 @@ func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestABCIQuery() {
|
||||
func (s *E2ETestSuite) TestABCIQuery() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
req *tmservice.ABCIQueryRequest
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -12,19 +12,19 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -33,12 +33,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewMsgVerifyInvariantTxCmd() {
|
||||
func (s *E2ETestSuite) TestNewMsgVerifyInvariantTxCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -9,8 +9,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(IntegrationTestSuite))
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
suite.Run(t, new(E2ETestSuite))
|
||||
}
|
||||
|
||||
func TestGRPCQueryTestSuite(t *testing.T) {
|
||||
|
||||
@ -3,6 +3,7 @@ package distribution
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
@ -11,7 +12,6 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
|
||||
"github.com/cosmos/cosmos-sdk/types/query"
|
||||
"github.com/cosmos/cosmos-sdk/x/distribution/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/x/distribution/types"
|
||||
)
|
||||
|
||||
@ -23,13 +23,13 @@ type GRPCQueryTestSuite struct {
|
||||
}
|
||||
|
||||
func (s *GRPCQueryTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig)
|
||||
s.Require().NoError(err)
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
s.cfg = cfg
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), cfg)
|
||||
s.Require().NoError(err)
|
||||
|
||||
@ -38,7 +38,7 @@ func (s *GRPCQueryTestSuite) SetupSuite() {
|
||||
|
||||
// TearDownSuite cleans up the curret test network after _each_ test.
|
||||
func (s *GRPCQueryTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite1")
|
||||
s.T().Log("tearing down e2e test suite1")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
@ -16,31 +17,29 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/distribution/client/cli"
|
||||
distrclitestutil "github.com/cosmos/cosmos-sdk/x/distribution/client/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/x/distribution/testutil"
|
||||
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
|
||||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
// SetupSuite creates a new network for _each_ integration test. We create a new
|
||||
// SetupSuite creates a new network for _each_ e2e test. We create a new
|
||||
// network for each test because there are some state modifications that are
|
||||
// needed to be made in order to make useful queries. However, we don't want
|
||||
// these state changes to be present in other tests.
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig)
|
||||
s.Require().NoError(err)
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
s.cfg = cfg
|
||||
|
||||
@ -65,12 +64,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
}
|
||||
|
||||
// TearDownSuite cleans up the curret test network after _each_ test.
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite1")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite1")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryParams() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryParams() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -107,7 +106,7 @@ withdraw_addr_enabled: true`,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDistributionInfo() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorDistributionInfo() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -149,7 +148,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDistributionInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorOutstandingRewards() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorOutstandingRewards() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
_, err := s.network.WaitForHeight(4)
|
||||
@ -212,7 +211,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorOutstandingRewards() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorCommission() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorCommission() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
_, err := s.network.WaitForHeight(4)
|
||||
@ -275,7 +274,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorCommission() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorSlashes() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorSlashes() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
_, err := s.network.WaitForHeight(4)
|
||||
@ -354,7 +353,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorSlashes() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryDelegatorRewards() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryDelegatorRewards() {
|
||||
val := s.network.Validators[0]
|
||||
addr := val.Address
|
||||
valAddr := sdk.ValAddress(addr)
|
||||
@ -455,7 +454,7 @@ total:
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryCommunityPool() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryCommunityPool() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
_, err := s.network.WaitForHeight(4)
|
||||
@ -494,7 +493,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryCommunityPool() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewWithdrawRewardsCmd() {
|
||||
func (s *E2ETestSuite) TestNewWithdrawRewardsCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -599,7 +598,7 @@ func (s *IntegrationTestSuite) TestNewWithdrawRewardsCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewWithdrawAllRewardsCmd() {
|
||||
func (s *E2ETestSuite) TestNewWithdrawAllRewardsCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -687,7 +686,7 @@ func (s *IntegrationTestSuite) TestNewWithdrawAllRewardsCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewSetWithdrawAddrCmd() {
|
||||
func (s *E2ETestSuite) TestNewSetWithdrawAddrCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -742,7 +741,7 @@ func (s *IntegrationTestSuite) TestNewSetWithdrawAddrCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewFundCommunityPoolCmd() {
|
||||
func (s *E2ETestSuite) TestNewFundCommunityPoolCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -13,7 +14,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/distribution/client/cli"
|
||||
"github.com/cosmos/cosmos-sdk/x/distribution/testutil"
|
||||
stakingcli "github.com/cosmos/cosmos-sdk/x/staking/client/cli"
|
||||
)
|
||||
|
||||
@ -25,12 +25,11 @@ type WithdrawAllTestSuite struct {
|
||||
}
|
||||
|
||||
func (s *WithdrawAllTestSuite) SetupSuite() {
|
||||
cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig)
|
||||
s.Require().NoError(err)
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 2
|
||||
s.cfg = cfg
|
||||
|
||||
s.T().Log("setting up integration test suite")
|
||||
s.T().Log("setting up e2e test suite")
|
||||
network, err := network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
s.Require().NoError(err)
|
||||
s.network = network
|
||||
@ -40,11 +39,11 @@ func (s *WithdrawAllTestSuite) SetupSuite() {
|
||||
|
||||
// TearDownSuite cleans up the curret test network after _each_ test.
|
||||
func (s *WithdrawAllTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
// This test requires multiple validators, if I add this test to `IntegrationTestSuite` by increasing
|
||||
// This test requires multiple validators, if I add this test to `E2ETestSuite` by increasing
|
||||
// `NumValidators` the existing tests are leading to non-determnism so created new suite for this test.
|
||||
func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() {
|
||||
require := s.Require()
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -10,19 +10,19 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/evidence/client/cli"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -31,12 +31,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetQueryCmd() {
|
||||
func (s *E2ETestSuite) TestGetQueryCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := map[string]struct {
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 3
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ const (
|
||||
oneHour = 60 * 60
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
@ -40,12 +40,12 @@ type IntegrationTestSuite struct {
|
||||
addedGrant feegrant.Grant
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
if testing.Short() {
|
||||
s.T().Skip("skipping test in unit-tests mode.")
|
||||
@ -74,7 +74,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
}
|
||||
|
||||
// createGrant creates a new basic allowance fee grant from granter to grantee.
|
||||
func (s *IntegrationTestSuite) createGrant(granter, grantee sdk.Address) {
|
||||
func (s *E2ETestSuite) createGrant(granter, grantee sdk.Address) {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
clientCtx := val.ClientCtx
|
||||
@ -105,12 +105,12 @@ func (s *IntegrationTestSuite) createGrant(granter, grantee sdk.Address) {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdGetFeeGrant() {
|
||||
func (s *E2ETestSuite) TestCmdGetFeeGrant() {
|
||||
val := s.network.Validators[0]
|
||||
granter := val.Address
|
||||
grantee := s.addedGrantee
|
||||
@ -196,7 +196,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrant() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGrantee() {
|
||||
func (s *E2ETestSuite) TestCmdGetFeeGrantsByGrantee() {
|
||||
val := s.network.Validators[0]
|
||||
grantee := s.addedGrantee
|
||||
clientCtx := val.ClientCtx
|
||||
@ -253,7 +253,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGrantee() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGranter() {
|
||||
func (s *E2ETestSuite) TestCmdGetFeeGrantsByGranter() {
|
||||
val := s.network.Validators[0]
|
||||
granter := s.addedGranter
|
||||
clientCtx := val.ClientCtx
|
||||
@ -309,7 +309,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGranter() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdFeeGrant() {
|
||||
func (s *E2ETestSuite) TestNewCmdFeeGrant() {
|
||||
val := s.network.Validators[0]
|
||||
granter := val.Address
|
||||
alreadyExistedGrantee := s.addedGrantee
|
||||
@ -604,7 +604,7 @@ func (s *IntegrationTestSuite) TestNewCmdFeeGrant() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdRevokeFeegrant() {
|
||||
func (s *E2ETestSuite) TestNewCmdRevokeFeegrant() {
|
||||
val := s.network.Validators[0]
|
||||
granter := s.addedGranter
|
||||
grantee := s.addedGrantee
|
||||
@ -711,7 +711,7 @@ func (s *IntegrationTestSuite) TestNewCmdRevokeFeegrant() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxWithFeeGrant() {
|
||||
func (s *E2ETestSuite) TestTxWithFeeGrant() {
|
||||
s.T().Skip() // TODO to re-enable in #12274
|
||||
|
||||
val := s.network.Validators[0]
|
||||
@ -801,7 +801,7 @@ func (s *IntegrationTestSuite) TestTxWithFeeGrant() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestFilteredFeeAllowance() {
|
||||
func (s *E2ETestSuite) TestFilteredFeeAllowance() {
|
||||
s.T().Skip() // TODO to re-enable in #12274
|
||||
|
||||
val := s.network.Validators[0]
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ func TestGetMigrationCallback(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestMigrateGenesis() {
|
||||
func (s *E2ETestSuite) TestMigrateGenesis() {
|
||||
val0 := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -19,19 +19,19 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -40,12 +40,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGenTxCmd() {
|
||||
func (s *E2ETestSuite) TestGenTxCmd() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
amount := sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(12))
|
||||
|
||||
@ -66,7 +66,7 @@ var v040Valid = `{
|
||||
"validators": []
|
||||
}`
|
||||
|
||||
func (s *IntegrationTestSuite) TestValidateGenesis() {
|
||||
func (s *E2ETestSuite) TestValidateGenesis() {
|
||||
val0 := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -16,10 +16,10 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
func TestDepositTestSuite(t *testing.T) {
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetProposalGRPC() {
|
||||
func (s *E2ETestSuite) TestGetProposalGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -54,7 +54,7 @@ func (s *IntegrationTestSuite) TestGetProposalGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetProposalsGRPC() {
|
||||
func (s *E2ETestSuite) TestGetProposalsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -108,7 +108,7 @@ func (s *IntegrationTestSuite) TestGetProposalsGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetProposalVoteGRPC() {
|
||||
func (s *E2ETestSuite) TestGetProposalVoteGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
voterAddressBech32 := val.Address.String()
|
||||
@ -180,7 +180,7 @@ func (s *IntegrationTestSuite) TestGetProposalVoteGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetProposalVotesGRPC() {
|
||||
func (s *E2ETestSuite) TestGetProposalVotesGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -219,7 +219,7 @@ func (s *IntegrationTestSuite) TestGetProposalVotesGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetProposalDepositGRPC() {
|
||||
func (s *E2ETestSuite) TestGetProposalDepositGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -268,7 +268,7 @@ func (s *IntegrationTestSuite) TestGetProposalDepositGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetProposalDepositsGRPC() {
|
||||
func (s *E2ETestSuite) TestGetProposalDepositsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -308,7 +308,7 @@ func (s *IntegrationTestSuite) TestGetProposalDepositsGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetTallyGRPC() {
|
||||
func (s *E2ETestSuite) TestGetTallyGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -352,7 +352,7 @@ func (s *IntegrationTestSuite) TestGetTallyGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetParamsGRPC() {
|
||||
func (s *E2ETestSuite) TestGetParamsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
params := v1.DefaultParams()
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdParams() {
|
||||
func (s *E2ETestSuite) TestCmdParams() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -68,7 +68,7 @@ voting_params:
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdParam() {
|
||||
func (s *E2ETestSuite) TestCmdParam() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -116,7 +116,7 @@ func (s *IntegrationTestSuite) TestCmdParam() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdProposer() {
|
||||
func (s *E2ETestSuite) TestCmdProposer() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -162,7 +162,7 @@ func (s *IntegrationTestSuite) TestCmdProposer() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdTally() {
|
||||
func (s *E2ETestSuite) TestCmdTally() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -218,7 +218,7 @@ func (s *IntegrationTestSuite) TestCmdTally() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdGetProposal() {
|
||||
func (s *E2ETestSuite) TestCmdGetProposal() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
title := "Text Proposal 1"
|
||||
@ -266,7 +266,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdGetProposals() {
|
||||
func (s *E2ETestSuite) TestCmdGetProposals() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -312,7 +312,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposals() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdQueryDeposits() {
|
||||
func (s *E2ETestSuite) TestCmdQueryDeposits() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -358,7 +358,7 @@ func (s *IntegrationTestSuite) TestCmdQueryDeposits() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdQueryDeposit() {
|
||||
func (s *E2ETestSuite) TestCmdQueryDeposit() {
|
||||
val := s.network.Validators[0]
|
||||
depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens)
|
||||
|
||||
@ -414,7 +414,7 @@ func (s *IntegrationTestSuite) TestCmdQueryDeposit() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdQueryVotes() {
|
||||
func (s *E2ETestSuite) TestCmdQueryVotes() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -465,7 +465,7 @@ func (s *IntegrationTestSuite) TestCmdQueryVotes() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCmdQueryVote() {
|
||||
func (s *E2ETestSuite) TestCmdQueryVote() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -21,19 +21,19 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -73,12 +73,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdSubmitProposal() {
|
||||
func (s *E2ETestSuite) TestNewCmdSubmitProposal() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
// Create a legacy proposal JSON, make sure it doesn't pass this new CLI
|
||||
@ -162,7 +162,7 @@ func (s *IntegrationTestSuite) TestNewCmdSubmitProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdSubmitLegacyProposal() {
|
||||
func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() {
|
||||
val := s.network.Validators[0]
|
||||
invalidProp := `{
|
||||
"title": "",
|
||||
@ -258,7 +258,7 @@ func (s *IntegrationTestSuite) TestNewCmdSubmitLegacyProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdDeposit() {
|
||||
func (s *E2ETestSuite) TestNewCmdDeposit() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -336,7 +336,7 @@ func (s *IntegrationTestSuite) TestNewCmdDeposit() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdVote() {
|
||||
func (s *E2ETestSuite) TestNewCmdVote() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -410,7 +410,7 @@ func (s *IntegrationTestSuite) TestNewCmdVote() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCmdWeightedVote() {
|
||||
func (s *E2ETestSuite) TestNewCmdWeightedVote() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 2
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
client "github.com/cosmos/cosmos-sdk/x/group/client/cli"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupInfo() {
|
||||
func (s *E2ETestSuite) TestQueryGroupInfo() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -70,7 +70,7 @@ func (s *IntegrationTestSuite) TestQueryGroupInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupsByMembers() {
|
||||
func (s *E2ETestSuite) TestQueryGroupsByMembers() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
require := s.Require()
|
||||
@ -147,7 +147,7 @@ func (s *IntegrationTestSuite) TestQueryGroupsByMembers() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupMembers() {
|
||||
func (s *E2ETestSuite) TestQueryGroupMembers() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -212,7 +212,7 @@ func (s *IntegrationTestSuite) TestQueryGroupMembers() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() {
|
||||
func (s *E2ETestSuite) TestQueryGroupsByAdmin() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -279,7 +279,7 @@ func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() {
|
||||
func (s *E2ETestSuite) TestQueryGroupPolicyInfo() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -335,7 +335,7 @@ func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() {
|
||||
func (s *E2ETestSuite) TestQueryGroupPoliciesByGroup() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -411,7 +411,7 @@ func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() {
|
||||
func (s *E2ETestSuite) TestQueryGroupPoliciesByAdmin() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -487,7 +487,7 @@ func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryProposal() {
|
||||
func (s *E2ETestSuite) TestQueryProposal() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -530,7 +530,7 @@ func (s *IntegrationTestSuite) TestQueryProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() {
|
||||
func (s *E2ETestSuite) TestQueryProposalsByGroupPolicy() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -593,7 +593,7 @@ func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryVoteByProposalVoter() {
|
||||
func (s *E2ETestSuite) TestQueryVoteByProposalVoter() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -636,7 +636,7 @@ func (s *IntegrationTestSuite) TestQueryVoteByProposalVoter() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryVotesByProposal() {
|
||||
func (s *E2ETestSuite) TestQueryVotesByProposal() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -699,7 +699,7 @@ func (s *IntegrationTestSuite) TestQueryVotesByProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryVotesByVoter() {
|
||||
func (s *E2ETestSuite) TestQueryVotesByVoter() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -762,7 +762,7 @@ func (s *IntegrationTestSuite) TestQueryVotesByVoter() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTallyResult() {
|
||||
func (s *E2ETestSuite) TestTallyResult() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/group/errors"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
@ -43,12 +43,12 @@ const validMetadata = "metadata"
|
||||
|
||||
var tooLongMetadata = strings.Repeat("A", 256)
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
s.commonFlags = []string{
|
||||
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
||||
@ -202,12 +202,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxCreateGroup() {
|
||||
func (s *E2ETestSuite) TestTxCreateGroup() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -362,7 +362,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() {
|
||||
func (s *E2ETestSuite) TestTxUpdateGroupAdmin() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -488,7 +488,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxUpdateGroupMetadata() {
|
||||
func (s *E2ETestSuite) TestTxUpdateGroupMetadata() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -572,7 +572,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMetadata() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() {
|
||||
func (s *E2ETestSuite) TestTxUpdateGroupMembers() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -698,7 +698,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() {
|
||||
func (s *E2ETestSuite) TestTxCreateGroupWithPolicy() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -908,7 +908,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() {
|
||||
func (s *E2ETestSuite) TestTxCreateGroupPolicy() {
|
||||
val := s.network.Validators[0]
|
||||
wrongAdmin := s.network.Validators[1].Address
|
||||
clientCtx := val.ClientCtx
|
||||
@ -1080,7 +1080,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyAdmin() {
|
||||
func (s *E2ETestSuite) TestTxUpdateGroupPolicyAdmin() {
|
||||
val := s.network.Validators[0]
|
||||
newAdmin := s.network.Validators[1].Address
|
||||
clientCtx := val.ClientCtx
|
||||
@ -1180,7 +1180,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyAdmin() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() {
|
||||
func (s *E2ETestSuite) TestTxUpdateGroupPolicyDecisionPolicy() {
|
||||
val := s.network.Validators[0]
|
||||
newAdmin := s.network.Validators[1].Address
|
||||
clientCtx := val.ClientCtx
|
||||
@ -1325,7 +1325,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyMetadata() {
|
||||
func (s *E2ETestSuite) TestTxUpdateGroupPolicyMetadata() {
|
||||
val := s.network.Validators[0]
|
||||
newAdmin := s.network.Validators[1].Address
|
||||
clientCtx := val.ClientCtx
|
||||
@ -1444,7 +1444,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyMetadata() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxSubmitProposal() {
|
||||
func (s *E2ETestSuite) TestTxSubmitProposal() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -1636,7 +1636,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxVote() {
|
||||
func (s *E2ETestSuite) TestTxVote() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -1835,7 +1835,7 @@ func (s *IntegrationTestSuite) TestTxVote() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxWithdrawProposal() {
|
||||
func (s *E2ETestSuite) TestTxWithdrawProposal() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -1967,7 +1967,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) getProposalIDFromTxResponse(txResp sdk.TxResponse) string {
|
||||
func (s *E2ETestSuite) getProposalIDFromTxResponse(txResp sdk.TxResponse) string {
|
||||
s.Require().Greater(len(txResp.Logs), 0)
|
||||
s.Require().NotNil(txResp.Logs[0].Events)
|
||||
events := txResp.Logs[0].Events
|
||||
@ -1982,7 +1982,7 @@ func (s *IntegrationTestSuite) getProposalIDFromTxResponse(txResp sdk.TxResponse
|
||||
return ""
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxExec() {
|
||||
func (s *E2ETestSuite) TestTxExec() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -2117,7 +2117,7 @@ func (s *IntegrationTestSuite) TestTxExec() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxLeaveGroup() {
|
||||
func (s *E2ETestSuite) TestTxLeaveGroup() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -2277,7 +2277,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestExecProposalsWhenMemberLeavesOrIsUpdated() {
|
||||
func (s *E2ETestSuite) TestExecProposalsWhenMemberLeavesOrIsUpdated() {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -2483,7 +2483,7 @@ func (s *IntegrationTestSuite) TestExecProposalsWhenMemberLeavesOrIsUpdated() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) getGroupIDFromTxResponse(txResp sdk.TxResponse) string {
|
||||
func (s *E2ETestSuite) getGroupIDFromTxResponse(txResp sdk.TxResponse) string {
|
||||
s.Require().Greater(len(txResp.Logs), 0)
|
||||
s.Require().NotNil(txResp.Logs[0].Events)
|
||||
events := txResp.Logs[0].Events
|
||||
@ -2500,7 +2500,7 @@ func (s *IntegrationTestSuite) getGroupIDFromTxResponse(txResp sdk.TxResponse) s
|
||||
|
||||
// createCLIProposal writes a CLI proposal with a MsgSend to a file. Returns
|
||||
// the path to the JSON file.
|
||||
func (s *IntegrationTestSuite) createCLIProposal(groupPolicyAddress, proposer, sendFrom, sendTo, metadata string) string {
|
||||
func (s *E2ETestSuite) createCLIProposal(groupPolicyAddress, proposer, sendFrom, sendTo, metadata string) string {
|
||||
_, err := base64.StdEncoding.DecodeString(metadata)
|
||||
s.Require().NoError(err)
|
||||
|
||||
@ -2525,7 +2525,7 @@ func (s *IntegrationTestSuite) createCLIProposal(groupPolicyAddress, proposer, s
|
||||
return testutil.WriteToNewTempFile(s.T(), string(bz)).Name()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) createAccounts(quantity int) []string {
|
||||
func (s *E2ETestSuite) createAccounts(quantity int) []string {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
accounts := make([]string, quantity)
|
||||
@ -2558,7 +2558,7 @@ func (s *IntegrationTestSuite) createAccounts(quantity int) []string {
|
||||
return accounts
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) createGroupWithMembers(membersWeight, membersAddress []string) string {
|
||||
func (s *E2ETestSuite) createGroupWithMembers(membersWeight, membersAddress []string) string {
|
||||
val := s.network.Validators[0]
|
||||
clientCtx := val.ClientCtx
|
||||
|
||||
@ -2588,7 +2588,7 @@ func (s *IntegrationTestSuite) createGroupWithMembers(membersWeight, membersAddr
|
||||
return s.getGroupIDFromTxResponse(txResp)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) createGroupThresholdPolicyWithBalance(adminAddress, groupID string, threshold int, tokens int64) string {
|
||||
func (s *E2ETestSuite) createGroupThresholdPolicyWithBalance(adminAddress, groupID string, threshold int, tokens int64) string {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
|
||||
val := s.network.Validators[0]
|
||||
@ -2627,7 +2627,7 @@ func (s *IntegrationTestSuite) createGroupThresholdPolicyWithBalance(adminAddres
|
||||
return groupPolicyAddress
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) newValidMembers(weights, membersAddress []string) group.MemberRequests {
|
||||
func (s *E2ETestSuite) newValidMembers(weights, membersAddress []string) group.MemberRequests {
|
||||
s.Require().Equal(len(weights), len(membersAddress))
|
||||
membersValid := group.MemberRequests{}
|
||||
for i, address := range membersAddress {
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
testCases := []struct {
|
||||
|
||||
@ -14,19 +14,19 @@ import (
|
||||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
genesisState := s.cfg.GenesisState
|
||||
|
||||
@ -49,12 +49,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryParams() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryParams() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -93,7 +93,7 @@ mint_denom: stake`,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryInflation() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryInflation() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -127,7 +127,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryInflation() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryAnnualProvisions() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryAnnualProvisions() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@ -13,8 +13,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/nft"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryBalanceGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryBalanceGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -61,7 +61,7 @@ func (s *IntegrationTestSuite) TestQueryBalanceGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryOwnerGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryOwnerGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -129,7 +129,7 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQuerySupplyGRPC() {
|
||||
func (s *E2ETestSuite) TestQuerySupplyGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -191,7 +191,7 @@ func (s *IntegrationTestSuite) TestQuerySupplyGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryNFTsGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryNFTsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -288,7 +288,7 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryNFTGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryNFTGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -353,7 +353,7 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryClassGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryClassGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -401,7 +401,7 @@ func (s *IntegrationTestSuite) TestQueryClassGRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryClassesGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryClassesGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
classURL := val.APIAddress + "/cosmos/nft/v1beta1/classes"
|
||||
resp, err := testutil.GetRequest(classURL)
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/nft"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryClass() {
|
||||
func (s *E2ETestSuite) TestQueryClass() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -48,7 +48,7 @@ func (s *IntegrationTestSuite) TestQueryClass() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryClasses() {
|
||||
func (s *E2ETestSuite) TestQueryClasses() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -76,7 +76,7 @@ func (s *IntegrationTestSuite) TestQueryClasses() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryNFT() {
|
||||
func (s *E2ETestSuite) TestQueryNFT() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -136,7 +136,7 @@ func (s *IntegrationTestSuite) TestQueryNFT() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryNFTs() {
|
||||
func (s *E2ETestSuite) TestQueryNFTs() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -209,7 +209,7 @@ func (s *IntegrationTestSuite) TestQueryNFTs() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryOwner() {
|
||||
func (s *E2ETestSuite) TestQueryOwner() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -274,7 +274,7 @@ func (s *IntegrationTestSuite) TestQueryOwner() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryBalance() {
|
||||
func (s *E2ETestSuite) TestQueryBalance() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -339,7 +339,7 @@ func (s *IntegrationTestSuite) TestQueryBalance() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQuerySupply() {
|
||||
func (s *E2ETestSuite) TestQuerySupply() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
|
||||
@ -50,7 +50,7 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
@ -58,12 +58,12 @@ type IntegrationTestSuite struct {
|
||||
owner sdk.AccAddress
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
genesisState := s.cfg.GenesisState
|
||||
nftGenesis := nft.GenesisState{
|
||||
@ -86,12 +86,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestCLITxSend() {
|
||||
func (s *E2ETestSuite) TestCLITxSend() {
|
||||
val := s.network.Validators[0]
|
||||
args := []string{
|
||||
fmt.Sprintf("--%s=%s", flags.FlagFrom, OwnerName),
|
||||
@ -138,7 +138,7 @@ func (s *IntegrationTestSuite) TestCLITxSend() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) initAccount() {
|
||||
func (s *E2ETestSuite) initAccount() {
|
||||
val := s.network.Validators[0]
|
||||
ctx := val.ClientCtx
|
||||
err := ctx.Keyring.ImportPrivKey(OwnerName, OwnerArmor, "1234567890")
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
clienttestutil "github.com/cosmos/cosmos-sdk/x/params/client/testutil"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, clienttestutil.NewIntegrationTestSuite(cfg))
|
||||
}
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/params/types/proposal"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryParamsGRPC() {
|
||||
func (s *E2ETestSuite) TestQueryParamsGRPC() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -25,9 +25,7 @@ import (
|
||||
|
||||
// mySubspace is a x/params subspace created for the purpose of this
|
||||
// test suite.
|
||||
const (
|
||||
mySubspace = "foo"
|
||||
)
|
||||
const mySubspace = "foo"
|
||||
|
||||
// myParams defines some params in the `mySubspace` subspace.
|
||||
type myParams struct{}
|
||||
@ -38,19 +36,19 @@ func (p *myParams) ParamSetPairs() paramtypes.ParamSetPairs {
|
||||
}
|
||||
}
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
// Create a new AppConstructor for this test suite, where we manually
|
||||
// add a subspace and `myParams` to the x/params store.
|
||||
@ -97,12 +95,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewQuerySubspaceParamsCmd() {
|
||||
func (s *E2ETestSuite) TestNewQuerySubspaceParamsCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
19
tests/e2e/slashing/cli_test.go
Normal file
19
tests/e2e/slashing/cli_test.go
Normal file
@ -0,0 +1,19 @@
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||
)
|
||||
|
||||
func (s *EndToEndTestSuite) TestGRPCQueries() {
|
||||
func (s *E2ETestSuite) TestGRPCQueries() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -15,21 +15,21 @@ import (
|
||||
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||
)
|
||||
|
||||
type EndToEndTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewEndToEndTestSuite(cfg network.Config) *EndToEndTestSuite {
|
||||
return &EndToEndTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
// SetupSuite executes bootstrapping logic before all the tests, i.e. once before
|
||||
// the entire suite, start executing.
|
||||
func (s *EndToEndTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
@ -40,12 +40,12 @@ func (s *EndToEndTestSuite) SetupSuite() {
|
||||
|
||||
// TearDownSuite performs cleanup logic after all the tests, i.e. once after the
|
||||
// entire suite, has finished executing.
|
||||
func (s *EndToEndTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestGetCmdQuerySigningInfo() {
|
||||
func (s *E2ETestSuite) TestGetCmdQuerySigningInfo() {
|
||||
val := s.network.Validators[0]
|
||||
pubKeyBz, err := s.cfg.Codec.MarshalInterfaceJSON(val.PubKey)
|
||||
s.Require().NoError(err)
|
||||
@ -103,7 +103,7 @@ tombstoned: false`, sdk.ConsAddress(val.PubKey.Address())),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestGetCmdQueryParams() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryParams() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -141,7 +141,7 @@ slash_fraction_downtime: "0.010000000000000000"`,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EndToEndTestSuite) TestNewUnjailTxCmd() {
|
||||
func (s *E2ETestSuite) TestNewUnjailTxCmd() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 2
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg))
|
||||
suite.Run(t, NewE2ETestSuite(cfg))
|
||||
}
|
||||
@ -16,7 +16,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryValidatorsHandler() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryValidatorsHandler() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -64,7 +64,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryValidatorsHandler() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryValidator() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryValidator() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -110,7 +110,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryValidator() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryValidatorDelegations() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryValidatorDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -173,7 +173,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryValidatorDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryValidatorUnbondingDelegations() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryValidatorUnbondingDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -220,7 +220,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryValidatorUnbondingDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryDelegation() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryDelegation() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
baseURL := val.APIAddress
|
||||
@ -296,7 +296,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryDelegation() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryUnbondingDelegation() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryUnbondingDelegation() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -354,7 +354,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryUnbondingDelegation() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryDelegatorDelegations() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryDelegatorDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -436,7 +436,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryDelegatorDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryDelegatorUnbondingDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -486,7 +486,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryRedelegations() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryRedelegations() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
baseURL := val.APIAddress
|
||||
@ -551,7 +551,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRedelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryDelegatorValidators() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryDelegatorValidators() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -598,7 +598,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryDelegatorValidators() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryDelegatorValidator() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryDelegatorValidator() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -654,7 +654,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryDelegatorValidator() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryHistoricalInfo() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryHistoricalInfo() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -700,7 +700,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryHistoricalInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryParams() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryParams() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -731,7 +731,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGRPCQueryPool() {
|
||||
func (s *E2ETestSuite) TestGRPCQueryPool() {
|
||||
val := s.network.Validators[0]
|
||||
baseURL := val.APIAddress
|
||||
|
||||
@ -26,19 +26,19 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
network *network.Network
|
||||
}
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{cfg: cfg}
|
||||
func NewE2ETestSuite(cfg network.Config) *E2ETestSuite {
|
||||
return &E2ETestSuite{cfg: cfg}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
if testing.Short() {
|
||||
s.T().Skip("skipping test in unit-tests mode.")
|
||||
@ -88,12 +88,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() {
|
||||
func (s *E2ETestSuite) TestNewCreateValidatorCmd() {
|
||||
require := s.Require()
|
||||
val := s.network.Validators[0]
|
||||
|
||||
@ -245,7 +245,7 @@ func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidator() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidator() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -286,7 +286,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidator() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidators() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidators() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -326,7 +326,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidators() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryDelegation() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryDelegation() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
|
||||
@ -393,7 +393,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegation() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryDelegations() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -449,7 +449,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDelegations() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -505,7 +505,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegations() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryUnbondingDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -553,7 +553,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegation() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryUnbondingDelegation() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -613,7 +613,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegation() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorUnbondingDelegations() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorUnbondingDelegations() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -661,7 +661,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorUnbondingDelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryRedelegations() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryRedelegations() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
|
||||
@ -713,7 +713,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryRedelegation() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
|
||||
@ -789,7 +789,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorRedelegations() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryValidatorRedelegations() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
|
||||
@ -841,7 +841,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorRedelegations() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryHistoricalInfo() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryHistoricalInfo() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -887,7 +887,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryHistoricalInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryParams() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryParams() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -922,7 +922,7 @@ unbonding_time: 1814400s`,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestGetCmdQueryPool() {
|
||||
func (s *E2ETestSuite) TestGetCmdQueryPool() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -959,7 +959,7 @@ not_bonded_tokens: "0"`, cli.DefaultTokens.Mul(sdk.NewInt(2)).String()),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewEditValidatorCmd() {
|
||||
func (s *E2ETestSuite) TestNewEditValidatorCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
details := "bio"
|
||||
@ -1075,7 +1075,7 @@ func (s *IntegrationTestSuite) TestNewEditValidatorCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewDelegateCmd() {
|
||||
func (s *E2ETestSuite) TestNewDelegateCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
k, _, err := val.ClientCtx.Keyring.NewMnemonic("NewAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1)
|
||||
@ -1161,7 +1161,7 @@ func (s *IntegrationTestSuite) TestNewDelegateCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewRedelegateCmd() {
|
||||
func (s *E2ETestSuite) TestNewRedelegateCmd() {
|
||||
val := s.network.Validators[0]
|
||||
val2 := s.network.Validators[1]
|
||||
|
||||
@ -1247,7 +1247,7 @@ func (s *IntegrationTestSuite) TestNewRedelegateCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewUnbondCmd() {
|
||||
func (s *E2ETestSuite) TestNewUnbondCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -1314,7 +1314,7 @@ func (s *IntegrationTestSuite) TestNewUnbondCmd() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestNewCancelUnbondingDelegationCmd() {
|
||||
func (s *E2ETestSuite) TestNewCancelUnbondingDelegationCmd() {
|
||||
val := s.network.Validators[0]
|
||||
|
||||
testCases := []struct {
|
||||
@ -1436,7 +1436,7 @@ func (s *IntegrationTestSuite) TestNewCancelUnbondingDelegationCmd() {
|
||||
// TestBlockResults tests that the validator updates correctly show when
|
||||
// calling the /block_results RPC endpoint.
|
||||
// ref: https://github.com/cosmos/cosmos-sdk/issues/7401.
|
||||
func (s *IntegrationTestSuite) TestBlockResults() {
|
||||
func (s *E2ETestSuite) TestBlockResults() {
|
||||
require := s.Require()
|
||||
val := s.network.Validators[0]
|
||||
|
||||
@ -1508,7 +1508,7 @@ func (s *IntegrationTestSuite) TestBlockResults() {
|
||||
}
|
||||
|
||||
// https://github.com/cosmos/cosmos-sdk/issues/10660
|
||||
func (s *IntegrationTestSuite) TestEditValidatorMoniker() {
|
||||
func (s *E2ETestSuite) TestEditValidatorMoniker() {
|
||||
val := s.network.Validators[0]
|
||||
require := s.Require()
|
||||
|
||||
@ -37,7 +37,7 @@ import (
|
||||
|
||||
var bankMsgSendEventAction = fmt.Sprintf("message.action='%s'", sdk.MsgTypeURL(&banktypes.MsgSend{}))
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
cfg network.Config
|
||||
@ -48,8 +48,8 @@ type IntegrationTestSuite struct {
|
||||
txRes sdk.TxResponse
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
@ -107,12 +107,12 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.txHeight = height
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestQueryBySig() {
|
||||
func (s *E2ETestSuite) TestQueryBySig() {
|
||||
// broadcast tx
|
||||
txb := s.mkTxBuilder()
|
||||
txbz, err := s.cfg.TxConfig.TxEncoder()(txb.GetTx())
|
||||
@ -193,7 +193,7 @@ func TestEventRegex(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestSimulateTx_GRPC() {
|
||||
func (s E2ETestSuite) TestSimulateTx_GRPC() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
// Convert the txBuilder to a tx.Tx.
|
||||
@ -240,7 +240,7 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestSimulateTx_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestSimulateTx_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
// Convert the txBuilder to a tx.Tx.
|
||||
@ -282,7 +282,7 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestGetTxEvents_GRPC() {
|
||||
func (s E2ETestSuite) TestGetTxEvents_GRPC() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
req *tx.GetTxsEventRequest
|
||||
@ -359,7 +359,7 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestGetTxEvents_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestGetTxEvents_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -436,7 +436,7 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestGetTx_GRPC() {
|
||||
func (s E2ETestSuite) TestGetTx_GRPC() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
req *tx.GetTxRequest
|
||||
@ -463,7 +463,7 @@ func (s IntegrationTestSuite) TestGetTx_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestGetTx_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestGetTx_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -510,7 +510,7 @@ func (s IntegrationTestSuite) TestGetTx_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestBroadcastTx_GRPC() {
|
||||
func (s E2ETestSuite) TestBroadcastTx_GRPC() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
txBytes, err := val.ClientCtx.TxConfig.TxEncoder()(txBuilder.GetTx())
|
||||
@ -548,7 +548,7 @@ func (s IntegrationTestSuite) TestBroadcastTx_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestBroadcastTx_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestBroadcastTx_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
txBytes, err := val.ClientCtx.TxConfig.TxEncoder()(txBuilder.GetTx())
|
||||
@ -586,7 +586,7 @@ func (s IntegrationTestSuite) TestBroadcastTx_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestSimMultiSigTx() {
|
||||
func (s *E2ETestSuite) TestSimMultiSigTx() {
|
||||
val1 := *s.network.Validators[0]
|
||||
|
||||
kr := val1.ClientCtx.Keyring
|
||||
@ -693,7 +693,7 @@ func (s *IntegrationTestSuite) TestSimMultiSigTx() {
|
||||
s.Require().Greater(res.GasInfo.GasUsed, uint64(0))
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPC() {
|
||||
func (s E2ETestSuite) TestGetBlockWithTxs_GRPC() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
req *tx.GetBlockWithTxsRequest
|
||||
@ -731,7 +731,7 @@ func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestGetBlockWithTxs_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -772,7 +772,7 @@ func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestTxEncode_GRPC() {
|
||||
func (s E2ETestSuite) TestTxEncode_GRPC() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
protoTx, err := txBuilderToProtoTx(txBuilder)
|
||||
@ -809,7 +809,7 @@ func (s IntegrationTestSuite) TestTxEncode_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxEncode_GRPCGateway() {
|
||||
func (s *E2ETestSuite) TestTxEncode_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
protoTx, err := txBuilderToProtoTx(txBuilder)
|
||||
@ -847,7 +847,7 @@ func (s *IntegrationTestSuite) TestTxEncode_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestTxDecode_GRPC() {
|
||||
func (s E2ETestSuite) TestTxDecode_GRPC() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
|
||||
@ -889,7 +889,7 @@ func (s IntegrationTestSuite) TestTxDecode_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestTxDecode_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestTxDecode_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
|
||||
@ -932,7 +932,7 @@ func (s IntegrationTestSuite) TestTxDecode_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestTxEncodeAmino_GRPC() {
|
||||
func (s E2ETestSuite) TestTxEncodeAmino_GRPC() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
stdTx, err := clienttx.ConvertTxToStdTx(val.ClientCtx.LegacyAmino, txBuilder.GetTx())
|
||||
@ -973,7 +973,7 @@ func (s IntegrationTestSuite) TestTxEncodeAmino_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestTxEncodeAmino_GRPCGateway() {
|
||||
func (s *E2ETestSuite) TestTxEncodeAmino_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
stdTx, err := clienttx.ConvertTxToStdTx(val.ClientCtx.LegacyAmino, txBuilder.GetTx())
|
||||
@ -1015,7 +1015,7 @@ func (s *IntegrationTestSuite) TestTxEncodeAmino_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestTxDecodeAmino_GRPC() {
|
||||
func (s E2ETestSuite) TestTxDecodeAmino_GRPC() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
|
||||
@ -1060,7 +1060,7 @@ func (s IntegrationTestSuite) TestTxDecodeAmino_GRPC() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) TestTxDecodeAmino_GRPCGateway() {
|
||||
func (s E2ETestSuite) TestTxDecodeAmino_GRPCGateway() {
|
||||
val := s.network.Validators[0]
|
||||
txBuilder := s.mkTxBuilder()
|
||||
|
||||
@ -1105,11 +1105,11 @@ func (s IntegrationTestSuite) TestTxDecodeAmino_GRPCGateway() {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(IntegrationTestSuite))
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
suite.Run(t, new(E2ETestSuite))
|
||||
}
|
||||
|
||||
func (s IntegrationTestSuite) mkTxBuilder() client.TxBuilder {
|
||||
func (s E2ETestSuite) mkTxBuilder() client.TxBuilder {
|
||||
val := s.network.Validators[0]
|
||||
s.Require().NoError(s.network.WaitForNextBlock())
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
)
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
func TestE2ETestSuite(t *testing.T) {
|
||||
cfg := network.DefaultConfig(simapp.NewTestNetworkFixture)
|
||||
cfg.NumValidators = 1
|
||||
|
||||
@ -23,5 +23,5 @@ func TestIntegrationTestSuite(t *testing.T) {
|
||||
app.UpgradeKeeper.SetVersionSetter(app.BaseApp)
|
||||
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap())
|
||||
|
||||
suite.Run(t, NewIntegrationTestSuite(cfg, app.UpgradeKeeper, ctx))
|
||||
suite.Run(t, NewE2ETestSuite(cfg, app.UpgradeKeeper, ctx))
|
||||
}
|
||||
|
||||
@ -13,15 +13,15 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
|
||||
func NewIntegrationTestSuite(cfg network.Config, keeper *keeper.Keeper, ctx sdk.Context) *IntegrationTestSuite {
|
||||
return &IntegrationTestSuite{
|
||||
func NewE2ETestSuite(cfg network.Config, keeper *keeper.Keeper, ctx sdk.Context) *E2ETestSuite {
|
||||
return &E2ETestSuite{
|
||||
cfg: cfg,
|
||||
upgradeKeeper: keeper,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
type E2ETestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
upgradeKeeper *keeper.Keeper
|
||||
@ -30,20 +30,20 @@ type IntegrationTestSuite struct {
|
||||
ctx sdk.Context
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) SetupSuite() {
|
||||
s.T().Log("setting up integration test suite")
|
||||
func (s *E2ETestSuite) SetupSuite() {
|
||||
s.T().Log("setting up e2e test suite")
|
||||
|
||||
var err error
|
||||
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
|
||||
s.Require().NoError(err)
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down integration test suite")
|
||||
func (s *E2ETestSuite) TearDownSuite() {
|
||||
s.T().Log("tearing down e2e test suite")
|
||||
s.network.Cleanup()
|
||||
}
|
||||
|
||||
func (s *IntegrationTestSuite) TestModuleVersionsCLI() {
|
||||
func (s *E2ETestSuite) TestModuleVersionsCLI() {
|
||||
testCases := []struct {
|
||||
msg string
|
||||
req types.QueryModuleVersionsRequest
|
||||
|
||||
Loading…
Reference in New Issue
Block a user