(t *testing.T, f string)
| 221 | } |
| 222 | |
| 223 | func setupMount(t *testing.T, f string) { |
| 224 | root := t.TempDir() |
| 225 | m := []mount.Mount{ |
| 226 | { |
| 227 | Type: "xfs", |
| 228 | Source: f, |
| 229 | Options: []string{"loop", "sync"}, |
| 230 | }, |
| 231 | } |
| 232 | |
| 233 | require.NoError(t, mount.All(m, root)) |
| 234 | require.NoError(t, os.Mkdir(filepath.Join(root, "root1"), 0755)) |
| 235 | require.NoError(t, os.Mkdir(filepath.Join(root, "root2"), 0755)) |
| 236 | require.NoError(t, os.Mkdir(filepath.Join(root, "work"), 0755)) |
| 237 | require.NoError(t, mount.UnmountAll(root, 0)) |
| 238 | } |
| 239 | |
| 240 | func withImage(image containerd.Image, args ...string) oci.SpecOpts { |
| 241 | return func(ctx context.Context, _ oci.Client, _ *containers.Container, s *oci.Spec) error { |
no test coverage detected
searching dependent graphs…