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

fix namespace creation in ocr soak tests #13690

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
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
20 changes: 7 additions & 13 deletions integration-tests/testsetups/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
geth "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/google/uuid"
"github.com/pelletier/go-toml/v2"
"github.com/rs/zerolog"
"github.com/smartcontractkit/seth"
Expand Down Expand Up @@ -152,22 +151,17 @@ func NewOCRSoakTest(t *testing.T, config *tc.TestConfig, opts ...OCRSoakTestOpti
func (o *OCRSoakTest) DeployEnvironment(ocrTestConfig tt.OcrTestConfig) {
nodeNetwork := networks.MustGetSelectedNetworkConfig(ocrTestConfig.GetNetworkConfig())[0] // Environment currently being used to soak test on

// Define namespace if default not set
if o.namespace == "" {
nsPre := fmt.Sprintf("soak-ocr-v%s-", o.OCRVersion)
if o.OperatorForwarderFlow {
nsPre = fmt.Sprintf("%sforwarder-", nsPre)
}

nsPre = fmt.Sprintf("%s%s", nsPre, strings.ReplaceAll(strings.ToLower(nodeNetwork.Name), " ", "-"))
nsPre = strings.ReplaceAll(nsPre, "_", "-")

o.namespace = fmt.Sprintf("%s-%s", nsPre, uuid.NewString()[0:5])
nsPre := fmt.Sprintf("soak-ocr-v%s-", o.OCRVersion)
if o.OperatorForwarderFlow {
nsPre = fmt.Sprintf("%sforwarder-", nsPre)
}

nsPre = fmt.Sprintf("%s%s", nsPre, strings.ReplaceAll(strings.ToLower(nodeNetwork.Name), " ", "-"))
nsPre = strings.ReplaceAll(nsPre, "_", "-")

baseEnvironmentConfig := &environment.Config{
TTL: time.Hour * 720, // 30 days,
Namespace: o.namespace,
NamespacePrefix: nsPre,
Test: o.t,
PreventPodEviction: true,
}
Expand Down
Loading