Skip to content

Commit

Permalink
Adds env var for running integration tests locally
Browse files Browse the repository at this point in the history
* Specify env var KAMEL_LOCAL to install kamel from local build rather
  than fetching it from OLM (adds --olm=false to install command)
  • Loading branch information
phantomjinx committed Feb 4, 2021
1 parent 3a69d17 commit a32904d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions e2e/support/test_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit a32904d

Please sign in to comment.