Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Jul 19, 2024
1 parent d0b8497 commit e61b9c8
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions integration-tests/chaos/automation_chaos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,16 +298,18 @@ func TestAutomationChaos(t *testing.T) {
err = actions.FundChainlinkNodesFromRootAddress(l, a.ChainClient, contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(chainlinkNodes[1:]), big.NewFloat(*config.Common.ChainlinkNodeFunding))
require.NoError(t, err, "Error funding Chainlink nodes")

consumersConditional, upkeepidsConditional := actions.DeployConsumers(t, a.ChainClient, a.Registry, a.Registrar, a.LinkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, false, false, false, nil)
var consumersLogTrigger, consumersConditional []contracts.KeeperConsumer
var upkeepidsConditional, upkeepidsLogTrigger []*big.Int
consumersConditional, upkeepidsConditional = actions.DeployConsumers(t, a.ChainClient, a.Registry, a.Registrar, a.LinkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, false, false, false, nil)
consumers := consumersConditional
upkeepIDs := upkeepidsConditional
if rv >= eth_contracts.RegistryVersion_2_1 {
consumersLogtrigger, upkeepidsLogtrigger := actions.DeployConsumers(t, a.ChainClient, a.Registry, a.Registrar, a.LinkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, true, false, false, nil)
consumersLogTrigger, upkeepidsLogTrigger = actions.DeployConsumers(t, a.ChainClient, a.Registry, a.Registrar, a.LinkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, true, false, false, nil)

consumers = append(consumersConditional, consumersLogtrigger...)
upkeepIDs = append(upkeepidsConditional, upkeepidsLogtrigger...)
consumers = append(consumersConditional, consumersLogTrigger...)
upkeepIDs = append(upkeepidsConditional, upkeepidsLogTrigger...)

for _, c := range consumersLogtrigger {
for _, c := range consumersLogTrigger {
err = c.Start()
require.NoError(t, err, "Error starting consumer")
}
Expand All @@ -331,6 +333,13 @@ func TestAutomationChaos(t *testing.T) {
_, err = testEnvironment.Chaos.Run(testCase.chaosFunc(testEnvironment.Cfg.Namespace, testCase.chaosProps))
require.NoError(t, err)

if rv >= eth_contracts.RegistryVersion_2_1 {
for _, c := range consumersLogTrigger {
err = c.Start()
require.NoError(t, err, "Error starting consumer")
}
}

gom.Eventually(func(g gomega.Gomega) {
// Check if the upkeeps are performing multiple times by analyzing their counters and checking they are greater than 10
for i := 0; i < len(upkeepIDs); i++ {
Expand Down

0 comments on commit e61b9c8

Please sign in to comment.