This is an automated email from the ASF dual-hosted git repository.

gfournier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit a2879cb67fc02a774de0325f41313e841041c199
Author: Gaelle Fournier <[email protected]>
AuthorDate: Mon Jun 3 16:59:56 2024 +0200

    fix(e2e): Add log.SetLogger on KamelInstall command
---
 e2e/advanced/main_test.go   | 1 +
 e2e/support/test_support.go | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/e2e/advanced/main_test.go b/e2e/advanced/main_test.go
index d58e335fb..ba95c61ca 100644
--- a/e2e/advanced/main_test.go
+++ b/e2e/advanced/main_test.go
@@ -39,6 +39,7 @@ import (
 )
 
 func TestMain(m *testing.M) {
+
        justCompile := GetEnvOrDefault("CAMEL_K_E2E_JUST_COMPILE", 
boolean.FalseString)
        if justCompile == "true" {
                os.Exit(m.Run())
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 36f92929b..64dbf0bc5 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -285,6 +285,9 @@ func KamelInstallWithIDAndKameletCatalog(t *testing.T, ctx 
context.Context, oper
 }
 
 func kamelInstallWithContext(t *testing.T, ctx context.Context, operatorID 
string, namespace string, skipKameletCatalog bool, args ...string) error {
+       // This line prevents controller-runtime from complaining about 
log.SetLogger never being called
+       logf.SetLogger(zap.New(zap.UseDevMode(true)))
+
        kamelInstallMutex.Lock()
        defer kamelInstallMutex.Unlock()
 
@@ -2688,8 +2691,6 @@ func CreateOperatorRoleBinding(t *testing.T, ctx 
context.Context, ns string) err
 // CreateKamelPodWithIntegrationSource generates and deploy a Pod from current 
Camel K controller image that will run a `kamel xxxx` command.
 // The integration parameter represent an Integration source file contained in 
a ConfigMap or Secret defined and mounted on the as a Volume.
 func CreateKamelPodWithIntegrationSource(t *testing.T, ctx context.Context, ns 
string, name string, integration v1.ValueSource, command ...string) error {
-       // This line prevents controller-runtime from complaining about 
log.SetLogger never being called
-       logf.SetLogger(zap.New(zap.UseDevMode(true)))
 
        var volumes []corev1.Volume
        if integration.SecretKeyRef != nil {

Reply via email to