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

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


The following commit(s) were added to refs/heads/release-1.9.x by this push:
     new c67ecccf3 Fix windows paths in --resource
c67ecccf3 is described below

commit c67ecccf3962d7b7d487bbf1949752785380e1a4
Author: mmajerni <mmaje...@redhat.com>
AuthorDate: Tue Jul 26 10:57:24 2022 +0200

    Fix windows paths in --resource
---
 e2e/common/cli/dev_mode_test.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/e2e/common/cli/dev_mode_test.go b/e2e/common/cli/dev_mode_test.go
index 180b1565d..909377a96 100644
--- a/e2e/common/cli/dev_mode_test.go
+++ b/e2e/common/cli/dev_mode_test.go
@@ -30,6 +30,7 @@ import (
        "os"
        "testing"
        "time"
+       "path/filepath"
 
        . "github.com/onsi/gomega"
        "github.com/stretchr/testify/assert"
@@ -123,7 +124,7 @@ func TestRunDevMode(t *testing.T) {
 
                        file := util.MakeTempCopy(t, 
"../config/files/resource-file-location-route.groovy")
 
-                       kamelRun := KamelWithContext(ctx, "run", "-n", ns, 
file, "--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", 
tmpFile.Name()))
+                       kamelRun := KamelWithContext(ctx, "run", "-n", ns, 
file, "--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", 
filepath.ToSlash(tmpFile.Name())))
                        kamelRun.SetOut(pipew)
 
                        logScanner := util.NewLogScanner(ctx, piper, 
`integration "resource-file-location-route" in phase Running`,
@@ -131,7 +132,7 @@ func TestRunDevMode(t *testing.T) {
 
                        args := os.Args
                        defer func() { os.Args = args }()
-                       os.Args = []string{"kamel", "run", "-n", ns, file, 
"--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", tmpFile.Name())}
+                       os.Args = []string{"kamel", "run", "-n", ns, file, 
"--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", 
filepath.ToSlash(tmpFile.Name()))}
                        go kamelRun.Execute()
 
                        Eventually(logScanner.IsFound(`integration 
"resource-file-location-route" in phase Running`), 
TestTimeoutMedium).Should(BeTrue())

Reply via email to