Skip to content

Commit 39bfbb7

Browse files
mmajernisquakez
authored andcommitted
chore(e2e) Add options to customize vars with ENVs in cli e2e tests
1 parent cfbe985 commit 39bfbb7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

e2e/common/cli/default.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ package cli
2323
import (
2424
"github.com/apache/camel-k/v2/e2e/support"
2525
"github.com/apache/camel-k/v2/pkg/platform"
26+
"os"
2627
)
2728

28-
var operatorNS = support.TestDefaultNamespace + "-cli"
29-
var operatorID = platform.DefaultPlatformName + "-cli"
29+
var operatorNS string
30+
var operatorID string
31+
32+
func init() {
33+
operatorNS = os.Getenv("CAMEL_K_GLOBAL_OPERATOR_NS")
34+
if operatorNS == "default" {
35+
operatorNS = support.TestDefaultNamespace + "-cli"
36+
}
37+
38+
operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", platform.DefaultPlatformName+"-cli")
39+
}

0 commit comments

Comments
 (0)