test: make #18472 test structure same as backports (#18504)

This commit is contained in:
Julien Robert 2023-11-18 00:57:06 +01:00 committed by GitHub
parent 80e0c631cc
commit 4b8be25516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 25 deletions

View File

@ -1,10 +1,11 @@
package tx
package tx_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
@ -14,6 +15,20 @@ import (
typestx "github.com/cosmos/cosmos-sdk/types/tx"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/counter"
countertypes "github.com/cosmos/cosmos-sdk/x/counter/types"
)
const (
memo = "waboom"
timeoutHeight = uint64(5)
)
var (
_, pub1, addr1 = testdata.KeyTestPubAddr()
rawSig = []byte("dummy")
msg1 = &countertypes.MsgIncreaseCounter{Signer: addr1.String(), Count: 1}
chainID = "test-chain"
)
func TestAuxTxBuilder(t *testing.T) {
@ -25,7 +40,7 @@ func TestAuxTxBuilder(t *testing.T) {
// required for test case: "GetAuxSignerData works for DIRECT_AUX"
counterModule.RegisterInterfaces(reg)
var b AuxTxBuilder
var b tx.AuxTxBuilder
testcases := []struct {
name string
@ -199,7 +214,7 @@ func TestAuxTxBuilder(t *testing.T) {
for _, tc := range testcases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
b = NewAuxTxBuilder()
b = tx.NewAuxTxBuilder()
err := tc.malleate()
if tc.expErr {

View File

@ -1,20 +0,0 @@
package tx
import (
"github.com/cosmos/cosmos-sdk/testutil/testdata"
countertypes "github.com/cosmos/cosmos-sdk/x/counter/types"
)
const (
memo = "waboom"
timeoutHeight = uint64(5)
)
var (
_, pub1, addr1 = testdata.KeyTestPubAddr()
_, _, addr2 = testdata.KeyTestPubAddr()
rawSig = []byte("dummy")
msg1 = &countertypes.MsgIncreaseCounter{Signer: addr1.String(), Count: 1}
chainID = "test-chain"
)

View File

@ -369,6 +369,8 @@ func TestSign(t *testing.T) {
}
func TestPreprocessHook(t *testing.T) {
_, _, addr2 := testdata.KeyTestPubAddr()
txConfig, cdc := newTestTxConfig()
requireT := require.New(t)
path := hd.CreateHDPath(118, 0, 0).String()

View File

@ -98,7 +98,7 @@ func initAppConfig() (string, interface{}) {
// In summary:
// - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their
// own app.toml config,
// - if you set srvCfg.MinGasPrices non-empty, validatorcan be used to extend the app.toml.s CAN tweak their
// - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their
// own app.toml to override, or use this default value.
//
// In simapp, we set the min gas prices to 0.

View File

@ -31,8 +31,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
* []() Remove invalid non SDK config from app.toml migration templates.
* [#18496](https://github.com/cosmos/cosmos-sdk/pull/18496) Remove invalid non SDK config from app.toml migration templates.
## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.0) - 2023-11-07
* [#17904](https://github.com/cosmos/cosmos-sdk/pull/17904) Add `view` command.