Skip to content

Commit

Permalink
set feature flag in load test (temp)
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Apr 2, 2024
1 parent e702562 commit 7b097e5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions integration-tests/actions/automationv2/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,25 @@ func (a *AutomationTest) AddBootstrapJob() error {
}

func (a *AutomationTest) AddAutomationJobs() error {
useBufferV1 := "true" // TODO: load from config
var contractVersion string
if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_2 {
contractVersion = "v2.1+"
} else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_1 {
contractVersion = "v2.1"
} else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_0 {
contractVersion = "v2.0"
useBufferV1 = ""
} else {
return fmt.Errorf("v2.0, v2.1, and v2.2 are the only supported versions")
}
pluginCfg := map[string]interface{}{
"mercuryCredentialName": "\"" + a.MercuryCredentialName + "\"",
"contractVersion": "\"" + contractVersion + "\"",
}
if len(useBufferV1) > 0 {
pluginCfg["useBufferV1"] = useBufferV1
}
for i := 1; i < len(a.ChainlinkNodes); i++ {
autoOCR2JobSpec := client.OCR2TaskJobSpec{
Name: "automation-" + contractVersion + "-" + a.Registry.Address(),
Expand All @@ -392,10 +401,7 @@ func (a *AutomationTest) AddAutomationJobs() error {
RelayConfig: map[string]interface{}{
"chainID": int(a.ChainClient.GetChainID().Int64()),
},
PluginConfig: map[string]interface{}{
"mercuryCredentialName": "\"" + a.MercuryCredentialName + "\"",
"contractVersion": "\"" + contractVersion + "\"",
},
PluginConfig: pluginCfg,
ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15),
TransmitterID: null.StringFrom(a.NodeDetails[i].TransmitterAddresses[a.TransmitterKeyIndex]),
P2PV2Bootstrappers: pq.StringArray{a.DefaultP2Pv2Bootstrapper},
Expand Down

0 comments on commit 7b097e5

Please sign in to comment.