Skip to content

Commit

Permalink
chore(e2e) Add options to customize vars with ENVs in cli e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmajerni authored and squakez committed Jun 19, 2024
1 parent 451e71e commit 7cc7364
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions e2e/common/cli/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

0 comments on commit 7cc7364

Please sign in to comment.