Skip to content

Commit

Permalink
chore: run make format (#13375)
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat authored Sep 23, 2022
1 parent b10097f commit af81605
Show file tree
Hide file tree
Showing 26 changed files with 24 additions and 50 deletions.
2 changes: 1 addition & 1 deletion cosmovisor/args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ func BenchmarkDetailString(b *testing.B) {
PollInterval: 450 * time.Second,
PreupgradeMaxRetries: 1e7,
}

b.ReportAllocs()
b.ResetTimer()

Expand Down
5 changes: 3 additions & 2 deletions depinject/module_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ var ownModuleKeyType = reflect.TypeOf((*OwnModuleKey)(nil)).Elem()
// not equal.
//
// Usage:
// moduleKeyCtx := &ModuleKeyContext{}
// fooKey := moduleKeyCtx.For("foo")
//
// moduleKeyCtx := &ModuleKeyContext{}
// fooKey := moduleKeyCtx.For("foo")
type ModuleKeyContext struct {
moduleKeys map[string]*moduleKey
}
Expand Down
1 change: 1 addition & 0 deletions orm/internal/testpb/bank.cosmos_orm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions orm/internal/testpb/test_schema.cosmos_orm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion orm/internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ func (k TestKeyCodec) Draw(t *rapid.T, id string) []protoreflect.Value {
n := len(k.KeySpecs)
keyValues := make([]protoreflect.Value, n)
for i, k := range k.KeySpecs {

keyValues[i] = protoreflect.ValueOf(k.Gen.Draw(t, fmt.Sprintf("%s[%d]", id, i)))
}
return keyValues
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/server/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
tmtypes "github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tm-db"

"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/server/types"
"cosmossdk.io/simapp"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
"github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/genutil"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/bank/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"

"github.com/cosmos/cosmos-sdk/baseapp"
"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/staking/keeper/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/require"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/cosmos/cosmos-sdk/codec"
"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/codec"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/staking/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"cosmossdk.io/simapp"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/bank/testutil"
"github.com/cosmos/cosmos-sdk/x/staking"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/staking/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/staking/keeper"
"github.com/cosmos/cosmos-sdk/x/staking/types"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/staking/keeper/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"

cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"cosmossdk.io/simapp"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/bank/testutil"
Expand Down
1 change: 0 additions & 1 deletion tx/textual/valuerenderer/coins.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (vr coinsValueRenderer) Format(ctx context.Context, v protoreflect.Value, w
default:
return fmt.Errorf("got invalid type %t for coins", v.Interface())
}

}

func (vr coinsValueRenderer) Parse(_ context.Context, r io.Reader) (protoreflect.Value, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/auth/keeper/deterministic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
type DeterministicTestSuite struct {
suite.Suite

ctx sdk.Context
ctx sdk.Context
queryClient types.QueryClient
accountKeeper keeper.AccountKeeper
encCfg moduletestutil.TestEncodingConfig
Expand Down
6 changes: 3 additions & 3 deletions x/auth/vesting/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"

"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/testutil"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
vestingtestutil "github.com/cosmos/cosmos-sdk/x/auth/vesting/testutil"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
)

Expand Down
5 changes: 2 additions & 3 deletions x/feegrant/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,7 @@ func (s *CLITestSuite) TestTxWithFeeGrant() {
}

func (s *CLITestSuite) msgSubmitLegacyProposal(clientCtx client.Context, from, title, description, proposalType string, extraArgs ...string) error {

var commonArgs = []string{
commonArgs := []string{
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync),
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()),
Expand Down Expand Up @@ -813,7 +812,7 @@ func (s *CLITestSuite) TestFilteredFeeAllowance() {

// msgVote votes for a proposal
func (s *CLITestSuite) msgVote(clientCtx client.Context, from, id, vote string, extraArgs ...string) error {
var commonArgs = []string{
commonArgs := []string{
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync),
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()),
Expand Down
2 changes: 0 additions & 2 deletions x/genutil/client/cli/gentx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (s *CLITestSuite) SetupSuite() {
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen().WithOutput(&outBuf)

}

func (s *CLITestSuite) TestGenTxCmd() {
Expand Down Expand Up @@ -147,7 +146,6 @@ func (s *CLITestSuite) TestGenTxCmd() {
tc.args = append(tc.args, fmt.Sprintf("--%s=%s", flags.FlagOutputDocument, genTxFile))

s.Run(tc.name, func() {

clientCtx := s.clientCtx
ctx := svrcmd.CreateExecuteContext(context.Background())

Expand Down
1 change: 0 additions & 1 deletion x/genutil/client/cli/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func (s *CLITestSuite) TestMigrateGenesis() {
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {

genesisFile := testutil.WriteToNewTempFile(s.T(), tc.genesis)
jsonOutput, err := clitestutil.ExecTestCLICmd(s.clientCtx, cli.MigrateGenesisCmd(), []string{tc.target, genesisFile.Name()})
if tc.expErr {
Expand Down
1 change: 0 additions & 1 deletion x/genutil/client/cli/validate_genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (s *CLITestSuite) TestValidateGenesis() {
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {

genesisFile := testutil.WriteToNewTempFile(s.T(), tc.genesis)
_, err := clitestutil.ExecTestCLICmd(s.clientCtx, cli.ValidateGenesisCmd(nil), []string{genesisFile.Name()})
if tc.expErr {
Expand Down
6 changes: 4 additions & 2 deletions x/gov/types/v1/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,13 @@ func TestMsgSubmitProposal_GetSignBytes(t *testing.T) {
expSignBz string
}{
{
"MsgVote", []sdk.Msg{v1.NewMsgVote(addrs[0], 1, v1.OptionYes, "")},
"MsgVote",
[]sdk.Msg{v1.NewMsgVote(addrs[0], 1, v1.OptionYes, "")},
`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/v1/MsgVote","value":{"option":1,"proposal_id":"1","voter":"cosmos1w3jhxap3gempvr"}}]}}`,
},
{
"MsgSend", []sdk.Msg{banktypes.NewMsgSend(addrs[0], addrs[0], sdk.NewCoins())},
"MsgSend",
[]sdk.Msg{banktypes.NewMsgSend(addrs[0], addrs[0], sdk.NewCoins())},
fmt.Sprintf(`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[],"from_address":"%s","to_address":"%s"}}]}}`, addrs[0], addrs[0]),
},
}
Expand Down
12 changes: 0 additions & 12 deletions x/group/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ func (s *CLITestSuite) TestTxCreateGroup() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -541,7 +540,6 @@ func (s *CLITestSuite) TestTxUpdateGroupMetadata() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -674,7 +672,6 @@ func (s *CLITestSuite) TestTxUpdateGroupMembers() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -859,7 +856,6 @@ func (s *CLITestSuite) TestTxCreateGroupWithPolicy() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -1055,7 +1051,6 @@ func (s *CLITestSuite) TestTxCreateGroupPolicy() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -1183,7 +1178,6 @@ func (s *CLITestSuite) TestTxUpdateGroupPolicyAdmin() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -1364,7 +1358,6 @@ func (s *CLITestSuite) TestTxUpdateGroupPolicyDecisionPolicy() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand All @@ -1380,7 +1373,6 @@ func (s *CLITestSuite) TestTxUpdateGroupPolicyDecisionPolicy() {
}
})
}

}

func (s *CLITestSuite) TestTxUpdateGroupPolicyMetadata() {
Expand Down Expand Up @@ -1502,7 +1494,6 @@ func (s *CLITestSuite) TestTxUpdateGroupPolicyMetadata() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -1620,7 +1611,6 @@ func (s *CLITestSuite) TestTxSubmitProposal() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -1743,7 +1733,6 @@ func (s *CLITestSuite) TestTxVote() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down Expand Up @@ -1819,7 +1808,6 @@ func (s *CLITestSuite) TestTxWithdrawProposal() {
tc := tc

s.Run(tc.name, func() {

var outBuf bytes.Buffer

clientCtx := tc.ctxGen().WithOutput(&outBuf)
Expand Down
3 changes: 2 additions & 1 deletion x/group/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,8 @@ func TestMsgSubmitProposalGetSignBytes(t *testing.T) {
expSignBz string
}{
{
"MsgSend", []sdk.Msg{banktypes.NewMsgSend(member1, member1, sdk.NewCoins())},
"MsgSend",
[]sdk.Msg{banktypes.NewMsgSend(member1, member1, sdk.NewCoins())},
fmt.Sprintf(`{"type":"cosmos-sdk/group/MsgSubmitProposal","value":{"messages":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[],"from_address":"%s","to_address":"%s"}}],"proposers":[""]}}`, member1, member1),
},
}
Expand Down
1 change: 0 additions & 1 deletion x/nft/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ func (s *CLITestSuite) TestCLITxSend() {
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {

args = append(args, tc.args...)
cmd := cli.NewCmdSend()
cmd.SetContext(s.ctx)
Expand Down
2 changes: 0 additions & 2 deletions x/slashing/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func (s *CLITestSuite) SetupSuite() {
}

func (s *CLITestSuite) TestGetCmdQuerySigningInfo() {

pubKeyBz, err := s.encCfg.Codec.MarshalInterfaceJSON(s.pub)
s.Require().NoError(err)
pubKeyStr := string(pubKeyBz)
Expand Down Expand Up @@ -153,7 +152,6 @@ func (s *CLITestSuite) TestGetCmdQuerySigningInfo() {
}

func (s *CLITestSuite) TestGetCmdQueryParams() {

testCases := []struct {
name string
args []string
Expand Down
7 changes: 0 additions & 7 deletions x/staking/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func (s *CLITestSuite) TestGetCmdQueryValidator() {
}

func (s *CLITestSuite) TestGetCmdQueryValidators() {

testCases := []struct {
name string
args []string
Expand Down Expand Up @@ -140,7 +139,6 @@ func (s *CLITestSuite) TestGetCmdQueryDelegation() {
}

func (s *CLITestSuite) TestGetCmdQueryDelegations() {

testCases := []struct {
name string
args []string
Expand Down Expand Up @@ -187,7 +185,6 @@ func (s *CLITestSuite) TestGetCmdQueryDelegations() {
}

func (s *CLITestSuite) TestGetCmdQueryValidatorDelegations() {

testCases := []struct {
name string
args []string
Expand Down Expand Up @@ -234,7 +231,6 @@ func (s *CLITestSuite) TestGetCmdQueryValidatorDelegations() {
}

func (s *CLITestSuite) TestGetCmdQueryUnbondingDelegations() {

testCases := []struct {
name string
args []string
Expand Down Expand Up @@ -279,7 +275,6 @@ func (s *CLITestSuite) TestGetCmdQueryUnbondingDelegations() {
}

func (s *CLITestSuite) TestGetCmdQueryUnbondingDelegation() {

testCases := []struct {
name string
args []string
Expand Down Expand Up @@ -335,7 +330,6 @@ func (s *CLITestSuite) TestGetCmdQueryUnbondingDelegation() {
}

func (s *CLITestSuite) TestGetCmdQueryValidatorUnbondingDelegations() {

testCases := []struct {
name string
args []string
Expand Down Expand Up @@ -533,7 +527,6 @@ func (s *CLITestSuite) TestGetCmdQueryValidatorRedelegations() {
}

func (s *CLITestSuite) TestGetCmdQueryPool() {

testCases := []struct {
name string
args []string
Expand Down
Loading

0 comments on commit af81605

Please sign in to comment.