From 69723444b1fac42224d3e638805412cb5f57d417 Mon Sep 17 00:00:00 2001 From: Domino Valdano <2644901+reductionista@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:32:58 -0800 Subject: [PATCH] Update build:integration tests --- pkg/solana/txm/txm_internal_test.go | 3 ++- pkg/solana/txm/txm_load_test.go | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/solana/txm/txm_internal_test.go b/pkg/solana/txm/txm_internal_test.go index 802dc93b2..378564c4a 100644 --- a/pkg/solana/txm/txm_internal_test.go +++ b/pkg/solana/txm/txm_internal_test.go @@ -27,6 +27,7 @@ import ( relayconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" + sqlutilmocks "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/mocks" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) @@ -113,7 +114,7 @@ func TestTxm(t *testing.T) { mkey.On("Sign", mock.Anything, mock.Anything, mock.Anything).Return([]byte{}, nil) loader := utils.NewLazyLoad(func() (client.ReaderWriter, error) { return mc, nil }) - txm := NewTxm(id, loader, nil, cfg, mkey, lggr) + txm := NewTxm(id, loader, nil, cfg, mkey, lggr, sqlutilmocks.NewDataSource(t)) require.NoError(t, txm.Start(ctx)) // tracking prom metrics diff --git a/pkg/solana/txm/txm_load_test.go b/pkg/solana/txm/txm_load_test.go index 744610e1f..36acd7576 100644 --- a/pkg/solana/txm/txm_load_test.go +++ b/pkg/solana/txm/txm_load_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + solanaClient "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm" @@ -22,6 +23,7 @@ import ( relayconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" + sqlutilmocks "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/mocks" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) @@ -72,7 +74,7 @@ func TestTxm_Integration(t *testing.T) { client, err := solanaClient.NewClient(url, cfg, 2*time.Second, lggr) require.NoError(t, err) loader := utils.NewLazyLoad(func() (solanaClient.ReaderWriter, error) { return client, nil }) - txm := txm.NewTxm("localnet", loader, nil, cfg, mkey, lggr) + txm := txm.NewTxm("localnet", loader, nil, cfg, mkey, lggr, sqlutilmocks.NewDataSource(t)) // track initial balance initBal, err := client.Balance(ctx, pubKey)