From 23b7a8d39377ec8cd52668fb059c19a39af151f7 Mon Sep 17 00:00:00 2001 From: ilija Date: Wed, 5 Jun 2024 01:50:52 +0200 Subject: [PATCH] Change write target test --- core/services/relay/evm/write_target_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/services/relay/evm/write_target_test.go b/core/services/relay/evm/write_target_test.go index 76060dce990..b39f0854a2d 100644 --- a/core/services/relay/evm/write_target_test.go +++ b/core/services/relay/evm/write_target_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/smartcontractkit/chainlink-common/pkg/values" + lpmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" @@ -35,6 +36,7 @@ var forwardABI = types.MustGetABI(forwarder.KeystoneForwarderMetaData.ABI) func TestEvmWrite(t *testing.T) { chain := evmmocks.NewChain(t) txManager := txmmocks.NewMockEvmTxManager(t) + logPoller := lpmocks.NewLogPoller(t) evmClient := evmclimocks.NewClient(t) // This probably isn't the best way to do this, but couldn't find a simpler way to mock the CallContract response @@ -46,7 +48,7 @@ func TestEvmWrite(t *testing.T) { chain.On("ID").Return(big.NewInt(11155111)) chain.On("TxManager").Return(txManager) - chain.On("LogPoller").Return(nil) + chain.On("LogPoller").Return(logPoller) chain.On("Client").Return(evmClient) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -63,6 +65,7 @@ func TestEvmWrite(t *testing.T) { evmCfg := evmtest.NewChainScopedConfig(t, cfg) chain.On("Config").Return(evmCfg) + logPoller.On("HasFilter", mock.Anything).Return(false) db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db)