diff --git a/integration-tests/docker/test_env/test_env_builder.go b/integration-tests/docker/test_env/test_env_builder.go index 7726c115fff..156ee0a9b8d 100644 --- a/integration-tests/docker/test_env/test_env_builder.go +++ b/integration-tests/docker/test_env/test_env_builder.go @@ -194,7 +194,7 @@ func (b *CLTestEnvBuilder) buildNewEnv(cfg *TestEnvConfig) (*CLClusterTestEnv, e if b.clNodeConfig != nil { cfg = b.clNodeConfig } else { - cfg = node.NewConfig(node.BaseConf, + cfg = node.NewConfig(node.NewBaseConfig(), node.WithOCR1(), node.WithP2Pv1(), ) diff --git a/integration-tests/scripts/buildTestMatrixList.sh b/integration-tests/scripts/buildTestMatrixList.sh index 25f72715095..8b7b093889e 100755 --- a/integration-tests/scripts/buildTestMatrixList.sh +++ b/integration-tests/scripts/buildTestMatrixList.sh @@ -32,6 +32,8 @@ matrix_output() { # Read the JSON file and loop through 'tests' and 'run' jq -c '.tests[]' ${JSONFILE} | while read -r test; do testName=$(echo ${test} | jq -r '.name') + label=$(echo ${test} | jq -r '.label // empty') + effective_node_label=${label:-$NODE_LABEL} subTests=$(echo ${test} | jq -r '.run[]?.name // empty') output="" @@ -41,14 +43,14 @@ jq -c '.tests[]' ${JSONFILE} | while read -r test; do if [ $COUNTER -ne 1 ]; then echo -n "," fi - matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}/${subTest}" ${NODE_LABEL} + matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}/${subTest}" ${effective_node_label} ((COUNTER++)) done else if [ $COUNTER -ne 1 ]; then echo -n "," fi - matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}" ${NODE_LABEL} + matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}" ${effective_node_label} ((COUNTER++)) fi diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index 67b9b0b2648..05fd3966e37 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -1003,7 +1003,7 @@ func setupAutomationTestDocker( network := networks.SelectedNetwork // build the node config - clNodeConfig := node.NewConfig(node.BaseConf) + clNodeConfig := node.NewConfig(node.NewBaseConfig()) syncInterval := models.MustMakeDuration(5 * time.Minute) clNodeConfig.Feature.LogPoller = it_utils.Ptr[bool](true) clNodeConfig.OCR2.Enabled = it_utils.Ptr[bool](true) diff --git a/integration-tests/smoke/automation_test.go_test_list.json b/integration-tests/smoke/automation_test.go_test_list.json index 515e1632701..de6c339dc16 100644 --- a/integration-tests/smoke/automation_test.go_test_list.json +++ b/integration-tests/smoke/automation_test.go_test_list.json @@ -2,105 +2,34 @@ "tests": [ { "name": "TestAutomationBasic", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1_conditional" - }, - { - "name": "registry_2_1_logtrigger" - } - ] + "label": "ubuntu20.04-32cores-128GB" }, { - "name": "TestAutomationAddFunds", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "name": "TestAutomationAddFunds" }, { "name": "TestAutomationPauseUnPause", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "label": "ubuntu20.04-16cores-64GB" }, { - "name": "TestAutomationRegisterUpkeep", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "name": "TestAutomationRegisterUpkeep" }, { - "name": "TestAutomationPauseRegistry", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "name": "TestAutomationPauseRegistry" }, { "name": "TestAutomationKeeperNodesDown", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "label": "ubuntu20.04-16cores-64GB" }, { - "name": "TestAutomationPerformSimulation", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "name": "TestAutomationPerformSimulation" }, { "name": "TestAutomationCheckPerformGasLimit", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "label": "ubuntu20.04-16cores-64GB" }, { - "name": "TestUpdateCheckData", - "run": [ - { - "name": "registry_2_0" - }, - { - "name": "registry_2_1" - } - ] + "name": "TestUpdateCheckData" }, { "name": "TestSetUpkeepTriggerConfig" diff --git a/integration-tests/smoke/forwarders_ocr2_test.go b/integration-tests/smoke/forwarders_ocr2_test.go index 81c521ff387..bf422b30faa 100644 --- a/integration-tests/smoke/forwarders_ocr2_test.go +++ b/integration-tests/smoke/forwarders_ocr2_test.go @@ -24,7 +24,7 @@ func TestForwarderOCR2Basic(t *testing.T) { env, err := test_env.NewCLTestEnvBuilder(). WithGeth(). WithMockServer(1). - WithCLNodeConfig(node.NewConfig(node.BaseConf, + WithCLNodeConfig(node.NewConfig(node.NewBaseConfig(), node.WithOCR2(), node.WithP2Pv2(), )). diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index f07c42ab3d8..336e9d89b5d 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -82,10 +82,11 @@ func TestKeeperBasicSmoke(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -157,10 +158,11 @@ func TestKeeperBlockCountPerTurn(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -259,10 +261,11 @@ func TestKeeperSimulation(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumersPerformance, upkeepIDs := actions.DeployPerformanceKeeperContracts( t, registryVersion, @@ -331,8 +334,10 @@ func TestKeeperCheckPerformGasLimit(t *testing.T) { ethereum.RegistryVersion_1_3, } - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumersPerformance, upkeepIDs := actions.DeployPerformanceKeeperContracts( t, @@ -442,10 +447,11 @@ func TestKeeperRegisterUpkeep(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, registrar, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -529,10 +535,11 @@ func TestKeeperAddFunds(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -591,10 +598,11 @@ func TestKeeperRemove(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -667,10 +675,11 @@ func TestKeeperPauseRegistry(t *testing.T) { ethereum.RegistryVersion_1_3, } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) - - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -818,8 +827,10 @@ func TestKeeperNodeDown(t *testing.T) { ethereum.RegistryVersion_1_3, } - for _, registryVersion := range registryVersions { + for _, rv := range registryVersions { + registryVersion := rv t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { + t.Parallel() chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, @@ -1082,7 +1093,7 @@ func setupKeeperTest(t *testing.T) ( contracts.LinkToken, *test_env.CLClusterTestEnv, ) { - clNodeConfig := node.NewConfig(node.BaseConf) + clNodeConfig := node.NewConfig(node.NewBaseConfig()) turnLookBack := int64(0) syncInterval := models.MustMakeDuration(5 * time.Second) performGasOverhead := uint32(150000) diff --git a/integration-tests/smoke/keeper_test.go_test_list.json b/integration-tests/smoke/keeper_test.go_test_list.json index 864dbfdb1cf..0148d7df848 100644 --- a/integration-tests/smoke/keeper_test.go_test_list.json +++ b/integration-tests/smoke/keeper_test.go_test_list.json @@ -1,35 +1,19 @@ { "tests": [ { - "name": "TestKeeperBasicSmoke" + "name": "TestKeeperBasicSmoke", + "label": "ubuntu20.04-32cores-128GB" }, { "name": "TestKeeperBlockCountPerTurn", - "run": [ - { - "name": "registry_1_1" - }, - { - "name": "registry_1_2" - }, - { - "name": "registry_1_3" - } - ] + "label": "ubuntu20.04-32cores-128GB" }, { "name": "TestKeeperSimulation" }, { "name": "TestKeeperCheckPerformGasLimit", - "run": [ - { - "name": "registry_1_2" - }, - { - "name": "registry_1_3" - } - ] + "label": "ubuntu20.04-16cores-64GB" }, { "name": "TestKeeperRegisterUpkeep" @@ -48,17 +32,7 @@ }, { "name": "TestKeeperNodeDown", - "run": [ - { - "name": "registry_1_1" - }, - { - "name": "registry_1_2" - }, - { - "name": "registry_1_3" - } - ] + "label": "ubuntu20.04-32cores-128GB" }, { "name": "TestKeeperPauseUnPauseUpkeep" diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index adaaf21ba19..36d53b40676 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -34,7 +34,7 @@ func TestOCRv2Basic(t *testing.T) { env, err := test_env.NewCLTestEnvBuilder(). WithGeth(). WithMockServer(1). - WithCLNodeConfig(node.NewConfig(node.BaseConf, + WithCLNodeConfig(node.NewConfig(node.NewBaseConfig(), node.WithOCR2(), node.WithP2Pv2(), )). diff --git a/integration-tests/types/config/node/core.go b/integration-tests/types/config/node/core.go index 0d433daa1b4..3702d11745f 100644 --- a/integration-tests/types/config/node/core.go +++ b/integration-tests/types/config/node/core.go @@ -23,8 +23,8 @@ import ( utils2 "github.com/smartcontractkit/chainlink/integration-tests/utils" ) -var ( - BaseConf = &chainlink.Config{ +func NewBaseConfig() *chainlink.Config { + return &chainlink.Config{ Core: toml.Core{ RootDir: utils2.Ptr("/home/chainlink"), Database: toml.Database{ @@ -60,7 +60,7 @@ var ( P2P: toml.P2P{}, }, } -) +} type NodeConfigOpt = func(c *chainlink.Config)