From 4fcbaa91c9fba911c61eeb6274fb98c4c9ee1957 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 20 Nov 2024 14:22:57 +0100 Subject: [PATCH 1/8] Minor --- core/services/keystore/keys/keystest/keystest.go | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 core/services/keystore/keys/keystest/keystest.go diff --git a/core/services/keystore/keys/keystest/keystest.go b/core/services/keystore/keys/keystest/keystest.go deleted file mode 100644 index 9265dc6e189..00000000000 --- a/core/services/keystore/keys/keystest/keystest.go +++ /dev/null @@ -1,15 +0,0 @@ -package keystest - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" -) - -func NewP2PKeyV2(t *testing.T) p2pkey.KeyV2 { - k, err := p2pkey.NewV2() - require.NoError(t, err) - return k -} From 16b9df0aadfb5eb55e6a8ef42c3132fe91d25772 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 20 Nov 2024 14:32:05 +0100 Subject: [PATCH 2/8] Minor --- .changeset/chilled-papayas-swim.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/chilled-papayas-swim.md diff --git a/.changeset/chilled-papayas-swim.md b/.changeset/chilled-papayas-swim.md new file mode 100644 index 00000000000..153930c2801 --- /dev/null +++ b/.changeset/chilled-papayas-swim.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#removed Remove duplicated test. From 42c8d47f38d27236c3517ba7f06440890297d4c9 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 20 Nov 2024 18:33:27 +0100 Subject: [PATCH 3/8] Update test usage. --- core/internal/features/features_test.go | 6 +++--- core/internal/features/ocr2/features_ocr2_test.go | 4 ++-- core/services/feeds/service_test.go | 9 +++++---- .../functions/integration_tests/v1/internal/testutils.go | 4 ++-- .../services/ocr2/plugins/ocr2keeper/integration_test.go | 4 ++-- core/web/presenters/p2p_key_test.go | 6 +++--- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index 919b01f3364..5ca521e4b32 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -25,6 +25,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -64,7 +65,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -693,7 +693,7 @@ func setupNode(t *testing.T, owner *bind.TransactOpts, portV2 int, b evmtypes.Backend, overrides func(c *chainlink.Config, s *chainlink.Secrets), ) (*cltest.TestApplication, string, common.Address, ocrkey.KeyV2) { ctx := testutils.Context(t) - p2pKey := keystest.NewP2PKeyV2(t) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. @@ -738,7 +738,7 @@ func setupNode(t *testing.T, owner *bind.TransactOpts, portV2 int, func setupForwarderEnabledNode(t *testing.T, owner *bind.TransactOpts, portV2 int, b evmtypes.Backend, overrides func(c *chainlink.Config, s *chainlink.Secrets)) (*cltest.TestApplication, string, common.Address, common.Address, ocrkey.KeyV2) { ctx := testutils.Context(t) - p2pKey := keystest.NewP2PKeyV2(t) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. diff --git a/core/internal/features/ocr2/features_ocr2_test.go b/core/internal/features/ocr2/features_ocr2_test.go index 2d8f55fcc9d..7039e38c7e7 100644 --- a/core/internal/features/ocr2/features_ocr2_test.go +++ b/core/internal/features/ocr2/features_ocr2_test.go @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient/simulated" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -45,7 +46,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" @@ -112,7 +112,7 @@ func setupNodeOCR2( p2pV2Bootstrappers []commontypes.BootstrapperLocator, ) *ocr2Node { ctx := testutils.Context(t) - p2pKey := keystest.NewP2PKeyV2(t) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 115695d8514..238338b91af 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -5,6 +5,7 @@ import ( "database/sql" "encoding/hex" "fmt" + "math/big" "testing" "time" @@ -12,6 +13,7 @@ import ( "github.com/google/uuid" "github.com/lib/pq" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -22,7 +24,7 @@ import ( proto "github.com/smartcontractkit/chainlink-protos/orchestrator/feedsmanager" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" + evmbig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -36,7 +38,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" jobmocks "github.com/smartcontractkit/chainlink/v2/core/services/job/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -1620,7 +1621,7 @@ func Test_Service_SyncNodeInfo(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - p2pKey := keystest.NewP2PKeyV2(t) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) ocrKey, err := ocrkey.NewV2() require.NoError(t, err) @@ -2046,7 +2047,7 @@ func Test_Service_ListSpecsByJobProposalIDs(t *testing.T) { } func Test_Service_ApproveSpec(t *testing.T) { - var evmChainID *big.Big + var evmChainID *evmbig.Big address := types.EIP55AddressFromAddress(common.Address{}) externalJobID := uuid.New() diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index a42997add2d..d1ab124f817 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -21,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/require" "github.com/smartcontractkit/libocr/commontypes" @@ -45,7 +46,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/functions" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" functionsConfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" @@ -321,7 +321,7 @@ func StartNewNode( thresholdKeyShare string, ) *Node { ctx := testutils.Context(t) - p2pKey := keystest.NewP2PKeyV2(t) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_test.go index c08cc3265e8..a52f7a7fab2 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_test.go @@ -49,8 +49,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" @@ -112,7 +112,7 @@ func setupNode( mercury mercury.MercuryEndpointMock, ) (chainlink.Application, string, common.Address, ocr2key.KeyBundle) { ctx := testutils.Context(t) - p2pKey := keystest.NewP2PKeyV2(t) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) p2paddresses := []string{fmt.Sprintf("127.0.0.1:%d", port)} cfg, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Feature.LogPoller = ptr(true) diff --git a/core/web/presenters/p2p_key_test.go b/core/web/presenters/p2p_key_test.go index 4e7b4e954fd..86907213887 100644 --- a/core/web/presenters/p2p_key_test.go +++ b/core/web/presenters/p2p_key_test.go @@ -2,17 +2,17 @@ package presenters import ( "fmt" + "math/big" "testing" "github.com/manyminds/api2go/jsonapi" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" ) func TestP2PKeyResource(t *testing.T) { - key := keystest.NewP2PKeyV2(t) + key := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) peerID := key.PeerID() peerIDStr := peerID.String() From a6c3c2a48aee933c039bb1084e6c40511e4e57b1 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 20 Nov 2024 18:50:39 +0100 Subject: [PATCH 4/8] Minor. --- .changeset/chilled-papayas-swim.md | 2 +- core/services/feeds/service_test.go | 2 +- .../functions/integration_tests/v1/internal/testutils.go | 2 +- core/web/presenters/p2p_key_test.go | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.changeset/chilled-papayas-swim.md b/.changeset/chilled-papayas-swim.md index 153930c2801..e2f2b536514 100644 --- a/.changeset/chilled-papayas-swim.md +++ b/.changeset/chilled-papayas-swim.md @@ -2,4 +2,4 @@ "chainlink": minor --- -#removed Remove duplicated test. +#removed Remove duplicated testing util for p2p_key only. diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 238338b91af..5369d645c4e 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -13,7 +13,6 @@ import ( "github.com/google/uuid" "github.com/lib/pq" "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -39,6 +38,7 @@ import ( jobmocks "github.com/smartcontractkit/chainlink/v2/core/services/job/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/versioning" diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index d1ab124f817..2b1832f8bfb 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -21,7 +21,6 @@ import ( "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/require" "github.com/smartcontractkit/libocr/commontypes" @@ -47,6 +46,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/functions" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" functionsConfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap" diff --git a/core/web/presenters/p2p_key_test.go b/core/web/presenters/p2p_key_test.go index 86907213887..2d6d307f207 100644 --- a/core/web/presenters/p2p_key_test.go +++ b/core/web/presenters/p2p_key_test.go @@ -6,9 +6,10 @@ import ( "testing" "github.com/manyminds/api2go/jsonapi" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func TestP2PKeyResource(t *testing.T) { From 751034a32ed5a511fd2f0fb2c752aa9e05849ca2 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 20 Nov 2024 18:52:19 +0100 Subject: [PATCH 5/8] Minor --- core/internal/features/features_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index 5ca521e4b32..bf3c8557b59 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -25,7 +25,6 @@ import ( "github.com/google/uuid" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -66,6 +65,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/webhook" From c333292f9196b64801acd9a52b32674950fa0525 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 20 Nov 2024 18:53:27 +0100 Subject: [PATCH 6/8] Minor --- core/internal/features/ocr2/features_ocr2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/internal/features/ocr2/features_ocr2_test.go b/core/internal/features/ocr2/features_ocr2_test.go index 7039e38c7e7..8222d4da4c7 100644 --- a/core/internal/features/ocr2/features_ocr2_test.go +++ b/core/internal/features/ocr2/features_ocr2_test.go @@ -23,7 +23,6 @@ import ( "github.com/ethereum/go-ethereum/ethclient/simulated" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -47,6 +46,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap" From 5310f5a7e81bbbfb437c0764bb485c4426286361 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Thu, 21 Nov 2024 10:54:52 +0100 Subject: [PATCH 7/8] Minor --- core/internal/features/ocr2/features_ocr2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/internal/features/ocr2/features_ocr2_test.go b/core/internal/features/ocr2/features_ocr2_test.go index 8222d4da4c7..cbde866c6a4 100644 --- a/core/internal/features/ocr2/features_ocr2_test.go +++ b/core/internal/features/ocr2/features_ocr2_test.go @@ -112,7 +112,7 @@ func setupNodeOCR2( p2pV2Bootstrappers []commontypes.BootstrapperLocator, ) *ocr2Node { ctx := testutils.Context(t) - p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(port))) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. From 1eaf63d1ee5647a5b0e793757e9268ec766cac23 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Thu, 21 Nov 2024 10:59:58 +0100 Subject: [PATCH 8/8] Minor. --- core/internal/features/features_test.go | 4 ++-- .../functions/integration_tests/v1/internal/testutils.go | 2 +- core/services/ocr2/plugins/ocr2keeper/integration_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index bf3c8557b59..2d0d046857c 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -693,7 +693,7 @@ func setupNode(t *testing.T, owner *bind.TransactOpts, portV2 int, b evmtypes.Backend, overrides func(c *chainlink.Config, s *chainlink.Secrets), ) (*cltest.TestApplication, string, common.Address, ocrkey.KeyV2) { ctx := testutils.Context(t) - p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(portV2))) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. @@ -738,7 +738,7 @@ func setupNode(t *testing.T, owner *bind.TransactOpts, portV2 int, func setupForwarderEnabledNode(t *testing.T, owner *bind.TransactOpts, portV2 int, b evmtypes.Backend, overrides func(c *chainlink.Config, s *chainlink.Secrets)) (*cltest.TestApplication, string, common.Address, common.Address, ocrkey.KeyV2) { ctx := testutils.Context(t) - p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(portV2))) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index 2b1832f8bfb..98aea240134 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -321,7 +321,7 @@ func StartNewNode( thresholdKeyShare string, ) *Node { ctx := testutils.Context(t) - p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(port))) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Insecure.OCRDevelopmentMode = ptr(true) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_test.go index a52f7a7fab2..66112756370 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_test.go @@ -112,7 +112,7 @@ func setupNode( mercury mercury.MercuryEndpointMock, ) (chainlink.Application, string, common.Address, ocr2key.KeyBundle) { ctx := testutils.Context(t) - p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) + p2pKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(port))) p2paddresses := []string{fmt.Sprintf("127.0.0.1:%d", port)} cfg, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Feature.LogPoller = ptr(true)