Skip to content

Commit b9ecd55

Browse files
committed
fixing file path for windows
1 parent ed5e342 commit b9ecd55

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/integration/tunnel_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"io/ioutil"
2222
"net/http"
2323
"os/exec"
24+
"path"
2425
"path/filepath"
2526
"runtime"
2627
"strings"
@@ -62,7 +63,11 @@ func testTunnel(t *testing.T) {
6263
kubectlRunner := util.NewKubectlRunner(t)
6364

6465
t.Log("deploying nginx...")
65-
podPath, _ := filepath.Abs("testdata/testsvc.yaml")
66+
curdir, err := filepath.Abs("")
67+
if err != nil {
68+
t.Errorf("Error getting the file path for current directory: %s", curdir)
69+
}
70+
podPath := path.Join(curdir, "testdata/testsvc.yaml")
6671
if _, err := kubectlRunner.RunCommand([]string{"apply", "-f", podPath}); err != nil {
6772
t.Fatalf("creating nginx ingress resource: %s", err)
6873
}

0 commit comments

Comments
 (0)