Use containerd plugin config.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -201,7 +201,7 @@ func TestSandboxDeletionAcrossCRIContainerdRestart(t *testing.T) {
|
||||
assert.Empty(t, loadedSandboxes)
|
||||
|
||||
t.Logf("Make sure sandbox root is removed")
|
||||
sandboxRoot := filepath.Join(criContainerdRoot, "sandboxes", sb)
|
||||
sandboxRoot := filepath.Join(*criContainerdRoot, "sandboxes", sb)
|
||||
_, err = os.Stat(sandboxRoot)
|
||||
assert.True(t, os.IsNotExist(err))
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ const (
|
||||
pauseImage = "gcr.io/google_containers/pause:3.0" // This is the same with default sandbox image.
|
||||
k8sNamespace = "k8s.io" // This is the same with server.k8sContainerdNamespace.
|
||||
containerdEndpoint = "/run/containerd/containerd.sock"
|
||||
criContainerdRoot = "/var/lib/cri-containerd"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -51,6 +50,7 @@ var (
|
||||
|
||||
var standaloneCRIContainerd = flag.Bool("standalone-cri-containerd", true, "Whether cri-containerd is running in standalone mode.")
|
||||
var criContainerdEndpoint = flag.String("cri-containerd-endpoint", "/var/run/cri-containerd.sock", "The endpoint of cri-containerd.")
|
||||
var criContainerdRoot = flag.String("cri-containerd-root", "/var/lib/cri-containerd", "The root directory of cri-containerd.")
|
||||
|
||||
func init() {
|
||||
flag.Parse()
|
||||
|
||||
@@ -70,7 +70,7 @@ func TestVolumeCopyUp(t *testing.T) {
|
||||
assert.Equal(t, "test_content\n", string(stdout))
|
||||
|
||||
t.Logf("Check host path of the volume")
|
||||
hostCmd := fmt.Sprintf("ls %s/containers/%s/volumes/*/test_file | xargs cat", criContainerdRoot, cn)
|
||||
hostCmd := fmt.Sprintf("ls %s/containers/%s/volumes/*/test_file | xargs cat", *criContainerdRoot, cn)
|
||||
output, err := exec.Command("sh", "-c", hostCmd).CombinedOutput()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "test_content\n", string(output))
|
||||
|
||||
Reference in New Issue
Block a user