You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/02/08 08:27:23 UTC
[camel-k] 04/04: Adds env var for running integration tests locally
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit e5b5731eec42059cf238101891d62fe8f972175a
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Thu Feb 4 21:10:45 2021 +0000
Adds env var for running integration tests locally
* Specify env var KAMEL_LOCAL to install kamel from local build rather
than fetching it from OLM (adds --olm=false to install command)
---
e2e/support/test_support.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 0c9f1aa..71f30e2 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -158,6 +158,11 @@ func KamelWithContext(ctx context.Context, args ...string) *cobra.Command {
var c *cobra.Command
var err error
+ kamelLocal := os.Getenv("KAMEL_LOCAL")
+ if kamelLocal == "true" && len(args) > 0 && args[0] == "install" {
+ args = append(args, "--olm=false")
+ }
+
kamelArgs := os.Getenv("KAMEL_ARGS")
kamelDefaultArgs := strings.Fields(kamelArgs)
args = append(kamelDefaultArgs, args...)