refactor!: remove broadcast mode block (#12659)

This commit is contained in:
Julien Robert
2022-09-23 15:16:31 +00:00
committed by GitHub
parent 6cbb587e18
commit df40c0a9d1
62 changed files with 893 additions and 937 deletions
+4 -4
View File
@@ -13,6 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/testutil/network"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/slashing/client/cli"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
)
type EndToEndTestSuite struct {
@@ -35,8 +36,7 @@ func (s *EndToEndTestSuite) SetupSuite() {
s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg)
s.Require().NoError(err)
_, err = s.network.WaitForHeight(1)
s.Require().NoError(err)
s.Require().NoError(s.network.WaitForNextBlock())
}
// TearDownSuite performs cleanup logic after all the tests, i.e. once after the
@@ -159,7 +159,7 @@ func (s *EndToEndTestSuite) TestNewUnjailTxCmd() {
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), // sync mode as there are no funds yet
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
},
false, 0, &sdk.TxResponse{},
false, slashingtypes.ErrValidatorNotJailed.ABCICode(), &sdk.TxResponse{},
},
}
@@ -178,7 +178,7 @@ func (s *EndToEndTestSuite) TestNewUnjailTxCmd() {
s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String())
txResp := tc.respType.(*sdk.TxResponse)
s.Require().Equal(tc.expectedCode, txResp.Code, out.String())
s.Require().NoError(clitestutil.CheckTxCode(s.network, clientCtx, txResp.TxHash, tc.expectedCode))
}
})
}