Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Sep 18, 2023
1 parent 696fd87 commit 78add43
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
12 changes: 0 additions & 12 deletions client/tx/aux_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,6 @@ func TestAuxTxBuilder(t *testing.T) {
},
true, "got unknown sign mode SIGN_MODE_UNSPECIFIED",
},
{
"GetSignBytes tipper should not be nil (if tip is set)",
func() error {
require.NoError(t, b.SetMsgs(msg1))
require.NoError(t, b.SetPubKey(pub1))
require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX))

_, err := b.GetSignBytes()
return err
},
true, "tipper cannot be empty",
},
{
"GetSignBytes works for DIRECT_AUX",
func() error {
Expand Down
15 changes: 0 additions & 15 deletions x/auth/migrations/legacytx/stdtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,6 @@ func TestStdSignBytes(t *testing.T) {
args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String(), Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"},
fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","granter":"%s","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, addr, msgStr),
},
{
"no fee, with tip",
args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"},
fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[{"amount":"150","denom":"tiptoken"}],"tipper":"%s"}}`, msgStr, addr),
},
{
"with fee and with tip",
args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"},
fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[{"amount":"150","denom":"tiptoken"}],"tipper":"%s"}}`, addr, msgStr, addr),
},
{
"with empty tip (but not nil), tipper cannot be empty",
args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"},
fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[],"tipper":"%s"}}`, msgStr, addr),
},
}
handler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{
FileResolver: proto.HybridResolver,
Expand Down
13 changes: 0 additions & 13 deletions x/tx/signing/aminojson/aminojson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ func TestAminoJsonSignMode(t *testing.T) {
return opts
},
},
{
name: "empty tipper",
malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions {
return opts
},
error: "tipper cannot be empty",
},
{
name: "nil fee",
malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions {
Expand All @@ -72,12 +65,6 @@ func TestAminoJsonSignMode(t *testing.T) {
},
error: "fee cannot be nil",
},
{
name: "tipper is signer",
malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions {
return opts
},
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 78add43

Please sign in to comment.