From 00c17bd68d54362a45b4b3464a88281020c2f366 Mon Sep 17 00:00:00 2001 From: FelixFan1992 Date: Mon, 19 Feb 2024 14:19:06 -0500 Subject: [PATCH] linter --- .../reorg/automation_reorg_test.go | 6 ++-- integration-tests/smoke/automation_test.go | 36 ++++++++++++++----- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index 15411d5e10c..8ee6507ab5d 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -20,12 +20,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" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" - tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" ) @@ -136,7 +134,9 @@ func TestAutomationReorg(t *testing.T) { "registry_2_2_logtrigger": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() config, err := tc.GetConfig("Reorg", tc.Automation) diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index cfb932e6ff5..4dded709ba7 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -100,7 +100,9 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool, automationTestConfig t "registry_2_2_with_logtrigger_and_mercury_v02": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { cfg := tc.MustCopy(automationTestConfig) t.Parallel() @@ -239,7 +241,9 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() config, err := tc.GetConfig("Smoke", tc.Automation) @@ -420,7 +424,9 @@ func TestAutomationAddFunds(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() config, err := tc.GetConfig("Smoke", tc.Automation) @@ -585,7 +591,9 @@ func TestAutomationRegisterUpkeep(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) @@ -672,7 +680,9 @@ func TestAutomationPauseRegistry(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() config, err := tc.GetConfig("Smoke", tc.Automation) @@ -744,7 +754,9 @@ func TestAutomationKeeperNodesDown(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) @@ -847,7 +859,9 @@ func TestAutomationPerformSimulation(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() config, err := tc.GetConfig("Smoke", tc.Automation) @@ -913,7 +927,9 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) @@ -1030,7 +1046,9 @@ func TestUpdateCheckData(t *testing.T) { "registry_2_2": ethereum.RegistryVersion_2_2, } - for name, registryVersion := range registryVersions { + for n, rv := range registryVersions { + name := n + registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t)