Skip to content

Commit 29a1813

Browse files
committed
Add txm test cases for purgeable retransmission and error handler
1 parent c3d4502 commit 29a1813

File tree

9 files changed

+368
-287
lines changed

9 files changed

+368
-287
lines changed

pkg/.mockery.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ packages:
5353
config:
5454
dir: txm
5555
outpkg: txm
56-
mockname: "mock{{ .InterfaceName }}"
56+
mockname: "Mock{{ .InterfaceName }}"
5757
filename: "mock_{{ .InterfaceName | snakecase }}_test.go"
5858
interfaces:
5959
Client:

pkg/txm/attempt_builder_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest"
1919
"github.com/smartcontractkit/chainlink-evm/pkg/testutils"
2020
"github.com/smartcontractkit/chainlink-evm/pkg/txm/types"
21+
"github.com/smartcontractkit/chainlink-framework/chains/fees"
2122
)
2223

2324
func TestAttemptBuilder_newLegacyAttempt(t *testing.T) {
@@ -266,7 +267,7 @@ func TestAttemptBuilder_NewAgnosticBumpAttempt(t *testing.T) {
266267
mockEstimator.On("BumpFee", mock.Anything, initialFee, mock.Anything, mock.Anything, mock.Anything).
267268
Return(firstBump, uint64(21000), nil).Once()
268269
mockEstimator.On("BumpFee", mock.Anything, firstBump, mock.Anything, mock.Anything, mock.Anything).
269-
Return(gas.EvmFee{}, uint64(0), errors.New("transaction propagation issue: transactions are not being mined")).Once()
270+
Return(gas.EvmFee{}, uint64(0), fees.ErrConnectivity).Once()
270271

271272
attempt, err := ab.NewAgnosticBumpAttempt(t.Context(), lggr, tx, false)
272273
require.NoError(t, err)

pkg/txm/mock_attempt_builder_test.go

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/txm/mock_client_test.go

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)