diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_config_helpers.go similarity index 99% rename from integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go rename to integration-tests/actions/vrf/ocr2vrf/ocr2vrf_config_helpers.go index 58e394cb797..0f49d96c70f 100644 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go +++ b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_config_helpers.go @@ -1,4 +1,4 @@ -package ocr2vrf_actions +package ocr2vrf import ( "crypto/ed25519" diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants/ocr2vrf_constants.go b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_constants/ocr2vrf_constants.go similarity index 100% rename from integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants/ocr2vrf_constants.go rename to integration-tests/actions/vrf/ocr2vrf/ocr2vrf_constants/ocr2vrf_constants.go diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_models.go b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_models.go similarity index 97% rename from integration-tests/actions/ocr2vrf_actions/ocr2vrf_models.go rename to integration-tests/actions/vrf/ocr2vrf/ocr2vrf_models.go index 08580203380..cd0cbcb6cf0 100644 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_models.go +++ b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_models.go @@ -1,4 +1,4 @@ -package ocr2vrf_actions +package ocr2vrf import ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_steps.go similarity index 99% rename from integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go rename to integration-tests/actions/vrf/ocr2vrf/ocr2vrf_steps.go index dd51e302744..64ee52544de 100644 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go +++ b/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_steps.go @@ -1,4 +1,4 @@ -package ocr2vrf_actions +package ocr2vrf import ( "math/big" @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" + "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_constants" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/logging" @@ -20,7 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" ) diff --git a/integration-tests/chaos/ocr2vrf_chaos_test.go b/integration-tests/chaos/ocr2vrf_chaos_test.go index eda60a37f3c..1b06df510fa 100644 --- a/integration-tests/chaos/ocr2vrf_chaos_test.go +++ b/integration-tests/chaos/ocr2vrf_chaos_test.go @@ -20,10 +20,10 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink-testing-framework/utils/ptr" "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" + "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/ocr2vrf" + "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_constants" "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/config" "github.com/smartcontractkit/chainlink/integration-tests/contracts" @@ -130,8 +130,8 @@ func TestOCR2VRFChaos(t *testing.T) { //}, } - for testCaseName, tc := range testCases { - testCase := tc + for testCaseName, test := range testCases { + testCase := test t.Run(fmt.Sprintf("OCR2VRF_%s", testCaseName), func(t *testing.T) { t.Parallel() testNetwork := networks.MustGetSelectedNetworkConfig(testconfig.Network)[0] // Need a new copy of the network for each test @@ -177,7 +177,7 @@ func TestOCR2VRFChaos(t *testing.T) { mockETHLinkFeed, err := contractDeployer.DeployMockETHLINKFeed(ocr2vrf_constants.LinkEthFeedResponse) require.NoError(t, err, "Error deploying Mock ETH/LINK Feed") - _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf_actions.SetupOCR2VRFUniverse( + _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf.SetupOCR2VRFUniverse( t, linkToken, mockETHLinkFeed, @@ -189,7 +189,7 @@ func TestOCR2VRFChaos(t *testing.T) { ) //Request and Redeem Randomness to verify that process works fine - requestID := ocr2vrf_actions.RequestAndRedeemRandomness( + requestID := ocr2vrf.RequestAndRedeemRandomness( t, consumerContract, chainClient, @@ -216,7 +216,7 @@ func TestOCR2VRFChaos(t *testing.T) { l.Info().Msg("Chaos Recovered") //Request and Redeem Randomness again to see that after Chaos Experiment whole process is still working - requestID = ocr2vrf_actions.RequestAndRedeemRandomness( + requestID = ocr2vrf.RequestAndRedeemRandomness( t, consumerContract, chainClient, diff --git a/integration-tests/smoke/ocr2vrf_test.go b/integration-tests/smoke/ocr2vrf_test.go index c01ac46fbbc..e29260cb588 100644 --- a/integration-tests/smoke/ocr2vrf_test.go +++ b/integration-tests/smoke/ocr2vrf_test.go @@ -17,10 +17,10 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/logging" "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" + "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/ocr2vrf" + "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/ocr2vrf/ocr2vrf_constants" "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/config" "github.com/smartcontractkit/chainlink/integration-tests/contracts" @@ -34,7 +34,7 @@ func TestOCR2VRFRedeemModel(t *testing.T) { t.Parallel() t.Skip("VRFv3 is on pause, skipping") l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.OCR2) + testConfig, err := tc.GetConfig("Smoke", tc.OCR2) if err != nil { t.Fatal(err) } @@ -54,7 +54,7 @@ func TestOCR2VRFRedeemModel(t *testing.T) { require.NoError(t, err, "Retreiving on-chain wallet addresses for chainlink nodes shouldn't fail") t.Cleanup(func() { - err := actions.TeardownSuite(t, testEnvironment, chainlinkNodes, nil, zapcore.ErrorLevel, &config, chainClient) + err := actions.TeardownSuite(t, testEnvironment, chainlinkNodes, nil, zapcore.ErrorLevel, &testConfig, chainClient) require.NoError(t, err, "Error tearing down environment") }) @@ -66,7 +66,7 @@ func TestOCR2VRFRedeemModel(t *testing.T) { mockETHLinkFeed, err := contractDeployer.DeployMockETHLINKFeed(ocr2vrf_constants.LinkEthFeedResponse) require.NoError(t, err, "Error deploying Mock ETH/LINK Feed") - _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf_actions.SetupOCR2VRFUniverse( + _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf.SetupOCR2VRFUniverse( t, linkToken, mockETHLinkFeed, @@ -78,7 +78,7 @@ func TestOCR2VRFRedeemModel(t *testing.T) { ) //Request and Redeem Randomness - requestID := ocr2vrf_actions.RequestAndRedeemRandomness( + requestID := ocr2vrf.RequestAndRedeemRandomness( t, consumerContract, chainClient, @@ -101,7 +101,7 @@ func TestOCR2VRFFulfillmentModel(t *testing.T) { t.Parallel() t.Skip("VRFv3 is on pause, skipping") l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.OCR2) + testConfig, err := tc.GetConfig("Smoke", tc.OCR2) if err != nil { t.Fatal(err) } @@ -121,7 +121,7 @@ func TestOCR2VRFFulfillmentModel(t *testing.T) { require.NoError(t, err, "Retreiving on-chain wallet addresses for chainlink nodes shouldn't fail") t.Cleanup(func() { - err := actions.TeardownSuite(t, testEnvironment, chainlinkNodes, nil, zapcore.ErrorLevel, &config, chainClient) + err := actions.TeardownSuite(t, testEnvironment, chainlinkNodes, nil, zapcore.ErrorLevel, &testConfig, chainClient) require.NoError(t, err, "Error tearing down environment") }) @@ -133,7 +133,7 @@ func TestOCR2VRFFulfillmentModel(t *testing.T) { mockETHLinkFeed, err := contractDeployer.DeployMockETHLINKFeed(ocr2vrf_constants.LinkEthFeedResponse) require.NoError(t, err, "Error deploying Mock ETH/LINK Feed") - _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf_actions.SetupOCR2VRFUniverse( + _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf.SetupOCR2VRFUniverse( t, linkToken, mockETHLinkFeed, @@ -144,7 +144,7 @@ func TestOCR2VRFFulfillmentModel(t *testing.T) { testNetwork, ) - requestID := ocr2vrf_actions.RequestRandomnessFulfillmentAndWaitForFulfilment( + requestID := ocr2vrf.RequestRandomnessFulfillmentAndWaitForFulfilment( t, consumerContract, chainClient,