This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch release-2.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/release-2.3.x by this push:
     new 6c22eb628 chore(e2e) Add options to customize vars with ENVs in cli 
e2e tests
6c22eb628 is described below

commit 6c22eb628f4f8edbcd0614792b90c005143fb6ff
Author: mmajerni <mmaje...@redhat.com>
AuthorDate: Mon Jun 17 10:57:25 2024 +0200

    chore(e2e) Add options to customize vars with ENVs in cli e2e tests
---
 e2e/common/cli/default.go | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/e2e/common/cli/default.go b/e2e/common/cli/default.go
index c6174d79c..8f4ac78b4 100644
--- a/e2e/common/cli/default.go
+++ b/e2e/common/cli/default.go
@@ -23,7 +23,17 @@ package cli
 import (
        "github.com/apache/camel-k/v2/e2e/support"
        "github.com/apache/camel-k/v2/pkg/platform"
+       "os"
 )
 
-var operatorNS = support.TestDefaultNamespace + "-cli"
-var operatorID = platform.DefaultPlatformName + "-cli"
+var operatorNS string
+var operatorID string
+
+func init() {
+       operatorNS = os.Getenv("CAMEL_K_GLOBAL_OPERATOR_NS")
+       if operatorNS == "default" {
+               operatorNS = support.TestDefaultNamespace + "-cli"
+       }
+
+       operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", 
platform.DefaultPlatformName+"-cli")
+}

Reply via email to