MCPcopy
hub / github.com/containerd/containerd / setupMount

Function setupMount

integration/client/mount_manager_linux_test.go:223–238  ·  view source on GitHub ↗
(t *testing.T, f string)

Source from the content-addressed store, hash-verified

221}
222
223func 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
240func withImage(image containerd.Image, args ...string) oci.SpecOpts {
241 return func(ctx context.Context, _ oci.Client, _ *containers.Container, s *oci.Spec) error {

Callers 1

createImgFileFunction · 0.85

Calls 2

AllFunction · 0.92
UnmountAllFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…