Skip to content

Commit

Permalink
lfg
Browse files Browse the repository at this point in the history
  • Loading branch information
testinginprod committed Oct 17, 2024
1 parent 5696991 commit e029976
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions x/accounts/defaults/base/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ func newMockContext(t *testing.T) (context.Context, store.KVStoreService) {
)
}

type transactionService struct {
}

func (t transactionService) ExecMode(ctx context.Context) transaction.ExecMode {
return transaction.ExecModeFinalize
}

func makeMockDependencies(storeservice store.KVStoreService) accountstd.Dependencies {
sb := collections.NewSchemaBuilder(storeservice)

Expand All @@ -74,8 +81,9 @@ func makeMockDependencies(storeservice store.KVStoreService) accountstd.Dependen
AddressCodec: addressCodec{},
LegacyStateCodec: mockStateCodec{},
Environment: appmodulev2.Environment{
EventService: eventService{},
HeaderService: headerService{},
EventService: eventService{},
HeaderService: headerService{},
TransactionService: transactionService{},
},
}
}
Expand Down
4 changes: 4 additions & 0 deletions x/auth/ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ func TestAnteHandlerBadSignBytes(t *testing.T) {
suite.bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil)
require.NoError(t, accs[0].acc.SetSequence(2)) // wrong accSeq

suite.ctx = suite.ctx.WithExecMode(sdk.ExecModeFinalize)

return TestCaseArgs{
chainID: suite.ctx.ChainID(),
feeAmount: feeAmount,
Expand Down Expand Up @@ -1081,6 +1083,8 @@ func TestAnteHandlerSetPubKey(t *testing.T) {
accs := suite.CreateTestAccounts(2)
suite.bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil)

suite.ctx = suite.ctx.WithExecMode(sdk.ExecModeFinalize)

// Make sure public key has not been set from previous test.
acc1 := suite.accountKeeper.GetAccount(suite.ctx, accs[1].acc.GetAddress())
require.Nil(t, acc1.GetPubKey())
Expand Down
2 changes: 1 addition & 1 deletion x/auth/ante/sigverify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestSigVerification(t *testing.T) {
if tc.recheck {
ctx = ctx.WithExecMode(sdk.ExecModeReCheck)
} else {
ctx = ctx.WithExecMode(sdk.ExecModeCheck)
ctx = ctx.WithExecMode(sdk.ExecModeFinalize)
}

suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() // Create new txBuilder for each test
Expand Down

0 comments on commit e029976

Please sign in to comment.