Skip to content

Commit

Permalink
fix configuration logic in ocrv2 smoke/soak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Jul 4, 2024
1 parent 416fd23 commit 81c7d9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func prepareORCv2SmokeTestEnv(t *testing.T, testData ocr2test, l zerolog.Logger,
err = actions.CreateOCRv2JobsLocal(aggregatorContracts, bootstrapNode, workerNodes, testEnv.MockAdapter, "ocr2", 5, uint64(sethClient.ChainID), false, testData.chainReaderAndCodec)
require.NoError(t, err, "Error creating OCRv2 jobs")

if config.OCR2.UseExistingOffChainAggregatorsContracts() && !config.OCR2.ConfigureExistingOffChainAggregatorsContracts() {
if !config.OCR2.UseExistingOffChainAggregatorsContracts() || (config.OCR2.UseExistingOffChainAggregatorsContracts() && config.OCR2.ConfigureExistingOffChainAggregatorsContracts()) {
ocrV2Config, err := actions.BuildMedianOCR2ConfigLocal(workerNodes, ocrOffChainOptions)
require.NoError(t, err, "Error building OCRv2 config")

Expand Down
10 changes: 6 additions & 4 deletions integration-tests/testsetups/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,12 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) {
ocrOffchainOptions,
)
require.NoError(o.t, err, "Error deploying OCRv2 contracts")
contractConfig, err := actions.BuildMedianOCR2Config(o.workerNodes, ocrOffchainOptions)
require.NoError(o.t, err, "Error building median config")
err = actions.ConfigureOCRv2AggregatorContracts(contractConfig, o.ocrV2Instances)
require.NoError(o.t, err, "Error configuring OCRv2 aggregator contracts")
if !ocrTestConfig.GetActiveOCRConfig().UseExistingOffChainAggregatorsContracts() || (ocrTestConfig.GetActiveOCRConfig().UseExistingOffChainAggregatorsContracts() && ocrTestConfig.GetActiveOCRConfig().ConfigureExistingOffChainAggregatorsContracts()) {
contractConfig, err := actions.BuildMedianOCR2Config(o.workerNodes, ocrOffchainOptions)
require.NoError(o.t, err, "Error building median config")
err = actions.ConfigureOCRv2AggregatorContracts(contractConfig, o.ocrV2Instances)
require.NoError(o.t, err, "Error configuring OCRv2 aggregator contracts")
}
}

if o.OCRVersion == "1" {
Expand Down

0 comments on commit 81c7d9b

Please sign in to comment.