From c21d439ce4a57521aff2f82a4527574692341966 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Tue, 25 Jun 2024 16:53:27 +0200 Subject: [PATCH] fix namespace creation in ocrv2 soak tests --- integration-tests/testsetups/ocr.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index fe4d15fc96f..749ca3beac9 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -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" @@ -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, }