Skip to content

Commit

Permalink
fix(e2e): stabilise kamel local e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tadayosi committed Aug 7, 2022
1 parent e4ba473 commit 6f42ed5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions e2e/local/local_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down
9 changes: 4 additions & 5 deletions e2e/local/local_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ package local
import (
"context"
"io"
"os"
"strings"
"testing"

Expand All @@ -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!")

Expand All @@ -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!")

Expand All @@ -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!")

Expand All @@ -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()

Expand All @@ -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!")

Expand Down

0 comments on commit 6f42ed5

Please sign in to comment.