Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes OCR soak Tests #8671

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 1 addition & 42 deletions integration-tests/soak/ocr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

func TestOCRSoak(t *testing.T) {
l := actions.GetTestLogger(t)
testEnvironment, network, testInputs := SetupOCREnvVarsSoakEnv(t)
testEnvironment, network, testInputs := SetupOCRSoakEnv(t)
if testEnvironment.WillUseRemoteRunner() {
return
}
Expand Down Expand Up @@ -107,47 +107,6 @@ func SetupOCRSoakEnv(t *testing.T) (*environment.Environment, blockchain.EVMNetw
return testEnvironment, network, testInputs
}

func SetupOCREnvVarsSoakEnv(t *testing.T) (*environment.Environment, blockchain.EVMNetwork, OcrSoakInputs) {
var testInputs OcrSoakInputs
err := envconfig.Process("OCR", &testInputs)
require.NoError(t, err, "Error reading OCR soak test inputs")
testInputs.setForRemoteRunner()

network := networks.SelectedNetwork // Environment currently being used to soak test on
baseEnvironmentConfig := &environment.Config{
TTL: time.Hour * 720, // 30 days,
NamespacePrefix: fmt.Sprintf(
"soak-ocr-%s",
strings.ReplaceAll(strings.ToLower(network.Name), " ", "-"),
),
Test: t,
}

replicas := 6
envVars := map[string]any{}
if !network.Simulated {
envVars["ETH_URL"] = network.URLs[0]
envVars["ETH_HTTP_URL"] = network.HTTPURLs[0]
envVars["ETH_CHAIN_ID"] = fmt.Sprint(network.ChainID)
}
testEnvironment := environment.New(baseEnvironmentConfig).
AddHelm(mockservercfg.New(nil)).
AddHelm(mockserver.New(nil)).
AddHelm(ethereum.New(&ethereum.Props{
NetworkName: network.Name,
Simulated: network.Simulated,
WsURLs: network.URLs,
}))
for i := 0; i < replicas; i++ {
testEnvironment.AddHelm(chainlink.NewVersioned(i, "0.0.11", map[string]any{
"env": envVars,
}))
}
err = testEnvironment.Run()
require.NoError(t, err, "Error launching test environment")
return testEnvironment, network, testInputs
}

type OcrSoakInputs struct {
TestDuration time.Duration `envconfig:"TEST_DURATION" default:"15m"`
ChainlinkNodeFunding float64 `envconfig:"CHAINLINK_NODE_FUNDING" default:".1"`
Expand Down