Merge pull request #6568 from katiewasnothere/cri_integration_tests_windows
Update TestContainerSymlinkVolumes to use windows path
This commit is contained in:
commit
ab2f7dcdbc
@ -19,6 +19,7 @@ package integration
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
goruntime "runtime"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -105,17 +106,22 @@ func TestContainerSymlinkVolumes(t *testing.T) {
|
|||||||
var (
|
var (
|
||||||
testImage = GetImage(BusyBox)
|
testImage = GetImage(BusyBox)
|
||||||
containerName = "test-container"
|
containerName = "test-container"
|
||||||
|
containerMountPath = "/mounted_file"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if goruntime.GOOS == "windows" {
|
||||||
|
containerMountPath = filepath.Clean("C:" + containerMountPath)
|
||||||
|
}
|
||||||
|
|
||||||
EnsureImageExists(t, testImage)
|
EnsureImageExists(t, testImage)
|
||||||
|
|
||||||
t.Log("Create a container with a symlink volume mount")
|
t.Log("Create a container with a symlink volume mount")
|
||||||
cnConfig := ContainerConfig(
|
cnConfig := ContainerConfig(
|
||||||
containerName,
|
containerName,
|
||||||
testImage,
|
testImage,
|
||||||
WithCommand("cat", "/mounted_file"),
|
WithCommand("cat", containerMountPath),
|
||||||
WithLogPath(containerName),
|
WithLogPath(containerName),
|
||||||
WithVolumeMount(file, "/mounted_file"),
|
WithVolumeMount(file, containerMountPath),
|
||||||
)
|
)
|
||||||
|
|
||||||
cn, err := runtimeService.CreateContainer(sb, cnConfig, sbConfig)
|
cn, err := runtimeService.CreateContainer(sb, cnConfig, sbConfig)
|
||||||
|
Loading…
Reference in New Issue
Block a user