Update TestContainerSymlinkVolumes to use windows path
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
This commit is contained in:
parent
c0bbaf5d15
commit
a3303e7214
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user