Add script to automatically update containerd with newest cri plugin.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-01-05 06:38:25 +00:00
parent bd9e9ce56e
commit 794543065a
5 changed files with 57 additions and 8 deletions

View File

@@ -31,8 +31,12 @@ import (
)
// Restart test must run sequentially.
// NOTE(random-liu): Current restart test only support standalone cri-containerd mode.
func TestSandboxAcrossCRIContainerdRestart(t *testing.T) {
if os.Getenv(standaloneEnvKey) == "false" {
t.Skip("Skip because cri-containerd does not run in standalone mode")
}
ctx := context.Background()
sandboxNS := "sandbox-restart-cri-containerd"
sandboxes := []struct {
@@ -149,6 +153,9 @@ func TestSandboxAcrossCRIContainerdRestart(t *testing.T) {
// teardown the network properly.
// This test uses host network sandbox to avoid resource leakage.
func TestSandboxDeletionAcrossCRIContainerdRestart(t *testing.T) {
if os.Getenv(standaloneEnvKey) == "false" {
t.Skip("Skip because cri-containerd does not run in standalone mode")
}
ctx := context.Background()
sandboxNS := "sandbox-delete-restart-cri-containerd"
t.Logf("Make sure no sandbox is running before test")

View File

@@ -41,6 +41,7 @@ const (
containerdEndpoint = "/run/containerd/containerd.sock"
criContainerdEndpoint = "/var/run/cri-containerd.sock"
criContainerdRoot = "/var/lib/cri-containerd"
standaloneEnvKey = "STANDALONE_CRI_CONTAINERD"
)
var (