diff --git a/integration/pull_test.go b/integration/pull_test.go index 51ef69368..a1ad00256 100644 --- a/integration/pull_test.go +++ b/integration/pull_test.go @@ -54,30 +54,6 @@ import ( ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) -// TestSnapshotterStartup tests to run containerd + snapshotter and check plugin is -// recognized by containerd -func TestSnapshotterStartup(t *testing.T) { - t.Parallel() - sh, done := newSnapshotterBaseShell(t) - defer done() - rebootContainerd(t, sh, "", "") - found := false - err := sh.ForEach(shell.C("ctr", "plugin", "ls"), func(l string) bool { - info := strings.Fields(l) - if len(info) < 4 { - t.Fatalf("malformed plugin info: %v", info) - } - if info[0] == "io.containerd.snapshotter.v1" && info[1] == "soci" && info[3] == "ok" { - found = true - return false - } - return true - }) - if err != nil || !found { - t.Fatalf("failed to get soci snapshotter status using ctr plugin ls: %v", err) - } -} - // TestOptimizeConsistentSociArtifact tests if the Soci artifact is produced consistently across runs. // This test does the following: // 1. Generate Soci artifact diff --git a/integration/startup_test.go b/integration/startup_test.go index 311f35019..f89141a13 100644 --- a/integration/startup_test.go +++ b/integration/startup_test.go @@ -18,11 +18,36 @@ package integration import ( "regexp" + "strings" "testing" shell "github.com/awslabs/soci-snapshotter/util/dockershell" ) +// TestSnapshotterStartup tests to run containerd + snapshotter and check plugin is +// recognized by containerd +func TestSnapshotterStartup(t *testing.T) { + t.Parallel() + sh, done := newSnapshotterBaseShell(t) + defer done() + rebootContainerd(t, sh, "", "") + found := false + err := sh.ForEach(shell.C("ctr", "plugin", "ls"), func(l string) bool { + info := strings.Fields(l) + if len(info) < 4 { + t.Fatalf("malformed plugin info: %v", info) + } + if info[0] == "io.containerd.snapshotter.v1" && info[1] == "soci" && info[3] == "ok" { + found = true + return false + } + return true + }) + if err != nil || !found { + t.Fatalf("failed to get soci snapshotter status using ctr plugin ls: %v", err) + } +} + // TestSnapshotterSystemdStartup tests that SOCI interacts with systemd socket activation correctly. // It verifies that SOCI works when using socket activation and that SOCI starts up correctly when // it is configured for socket activation, but it launches directly.