You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/08/07 13:01:39 UTC

[camel-k] 09/09: fix(e2e): stabilise kamel local e2e tests

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

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

commit 6f42ed56e69cc8da1b1fdd080357664b9a7b85fe
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Fri Jul 29 22:39:04 2022 +0900

    fix(e2e): stabilise kamel local e2e tests
---
 e2e/local/local_build_test.go | 2 ++
 e2e/local/local_run_test.go   | 9 ++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/e2e/local/local_build_test.go b/e2e/local/local_build_test.go
index 2ea34f91b..2c0f40c6d 100644
--- a/e2e/local/local_build_test.go
+++ b/e2e/local/local_build_test.go
@@ -65,6 +65,7 @@ func TestLocalBuild(t *testing.T) {
 
 	kamelBuild := KamelWithContext(ctx, "local", "build", file, "--image", image)
 	kamelBuild.SetOut(pipew)
+	kamelBuild.SetErr(pipew)
 
 	msgTagged := "Successfully tagged"
 	logScanner := testutil.NewLogScanner(ctx, piper, msgTagged, image)
@@ -94,6 +95,7 @@ func TestLocalBuildWithTrait(t *testing.T) {
 
 	kamelBuild := KamelWithContext(ctx, "local", "build", file, "--image", image)
 	kamelBuild.SetOut(pipew)
+	kamelBuild.SetErr(pipew)
 
 	msgWarning := "Warning: traits are specified but don't take effect for local run: [jolokia.enabled=true]"
 	msgTagged := "Successfully tagged"
diff --git a/e2e/local/local_run_test.go b/e2e/local/local_run_test.go
index c703e3825..cef5112b1 100644
--- a/e2e/local/local_run_test.go
+++ b/e2e/local/local_run_test.go
@@ -23,7 +23,6 @@ package local
 import (
 	"context"
 	"io"
-	"os"
 	"strings"
 	"testing"
 
@@ -48,6 +47,7 @@ func TestLocalRun(t *testing.T) {
 
 	kamelRun := KamelWithContext(ctx, "local", "run", file)
 	kamelRun.SetOut(pipew)
+	kamelRun.SetErr(pipew)
 
 	logScanner := testutil.NewLogScanner(ctx, piper, "Magicstring!")
 
@@ -73,6 +73,7 @@ func TestLocalRunWithDependencies(t *testing.T) {
 
 	kamelRun := KamelWithContext(ctx, "local", "run", file, "-d", "camel-amqp")
 	kamelRun.SetOut(pipew)
+	kamelRun.SetErr(pipew)
 
 	logScanner := testutil.NewLogScanner(ctx, piper, "Magicstring!")
 
@@ -99,6 +100,7 @@ func TestLocalRunContainerize(t *testing.T) {
 
 	kamelRun := KamelWithContext(ctx, "local", "run", file, "--image", image, "--containerize")
 	kamelRun.SetOut(pipew)
+	kamelRun.SetErr(pipew)
 
 	logScanner := testutil.NewLogScanner(ctx, piper, "Magicstring!")
 
@@ -116,10 +118,6 @@ func TestLocalRunContainerize(t *testing.T) {
 func TestLocalRunIntegrationDirectory(t *testing.T) {
 	RegisterTestingT(t)
 
-	if os.Getenv("CI") == "true" {
-		t.Skip("TODO: Temporarily disabled as this test is flaky and hangs the test process")
-	}
-
 	ctx1, cancel1 := context.WithCancel(TestContext)
 	defer cancel1()
 
@@ -146,6 +144,7 @@ func TestLocalRunIntegrationDirectory(t *testing.T) {
 
 	kamelRun := KamelWithContext(ctx2, "local", "run", "--integration-directory", dir)
 	kamelRun.SetOut(pipew)
+	kamelRun.SetErr(pipew)
 
 	logScanner := testutil.NewLogScanner(ctx2, piper, "Magicstring!")