You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2024/06/19 13:18:24 UTC

(camel-k) branch release-2.3.x updated: chore(e2e) Add options to customize vars with ENVs in cli e2e tests

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 <mm...@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")
+}