From 5496e94a7ec5db81f58e787a7d6dcf29efab7e37 Mon Sep 17 00:00:00 2001 From: Vishwas Siravara Date: Tue, 19 Sep 2023 23:15:30 +0000 Subject: [PATCH] fix: Fix container filepath to make it platform independent (#80) Issue #, if available: N/A *Description of changes:* In the `container cp` command test, container path is evaluated using `filepath.Join("/tmp", filename)`. On windows this evaluates to `/tmp\` which is not a unix path for the container. *Testing done:* Yes - [X] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Vishwas Siravara --- tests/cp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cp.go b/tests/cp.go index b6914e8..c53376d 100644 --- a/tests/cp.go +++ b/tests/cp.go @@ -20,7 +20,7 @@ import ( func Cp(o *option.Option) { filename := "test-file" content := "test-content" - containerFilepath := filepath.Join("/tmp", filename) + containerFilepath := filepath.ToSlash(filepath.Join("/tmp", filename)) containerResource := fmt.Sprintf("%s:%s", testContainerName, containerFilepath) ginkgo.Describe("copy from container to host and vice versa", func() {