From a3303e72147f227827ed4d2f435fb080feb5ad5e Mon Sep 17 00:00:00 2001 From: Kathryn Baldauf Date: Fri, 18 Feb 2022 12:11:07 -0800 Subject: [PATCH] Update TestContainerSymlinkVolumes to use windows path Signed-off-by: Kathryn Baldauf --- integration/container_volume_test.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/integration/container_volume_test.go b/integration/container_volume_test.go index 8c70d8ada..dbb822b57 100644 --- a/integration/container_volume_test.go +++ b/integration/container_volume_test.go @@ -19,6 +19,7 @@ package integration import ( "os" "path/filepath" + goruntime "runtime" "testing" "time" @@ -103,19 +104,24 @@ func TestContainerSymlinkVolumes(t *testing.T) { ) var ( - testImage = GetImage(BusyBox) - containerName = "test-container" + testImage = GetImage(BusyBox) + containerName = "test-container" + containerMountPath = "/mounted_file" ) + if goruntime.GOOS == "windows" { + containerMountPath = filepath.Clean("C:" + containerMountPath) + } + EnsureImageExists(t, testImage) t.Log("Create a container with a symlink volume mount") cnConfig := ContainerConfig( containerName, testImage, - WithCommand("cat", "/mounted_file"), + WithCommand("cat", containerMountPath), WithLogPath(containerName), - WithVolumeMount(file, "/mounted_file"), + WithVolumeMount(file, containerMountPath), ) cn, err := runtimeService.CreateContainer(sb, cnConfig, sbConfig)