MCPcopy Create free account
hub / github.com/containerd/nerdctl / TestRunIpcHost

Function TestRunIpcHost

cmd/nerdctl/container/container_run_linux_test.go:187–197  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

185}
186
187func TestRunIpcHost(t *testing.T) {
188 t.Parallel()
189 base := testutil.NewBase(t)
190 testFilePath := filepath.Join("/dev/shm",
191 fmt.Sprintf("%s-%d-%s", testutil.Identifier(t), os.Geteuid(), base.Target))
192 err := os.WriteFile(testFilePath, []byte(""), 0o644)
193 assert.NilError(base.T, err)
194 defer os.Remove(testFilePath)
195
196 base.Cmd("run", "--rm", "--ipc=host", testutil.AlpineImage, "ls", testFilePath).AssertOK()
197}
198
199func TestRunAddHost(t *testing.T) {
200 // Not parallelizable (https://github.com/containerd/nerdctl/issues/1127)

Callers

nothing calls this directly

Calls 6

CmdMethod · 0.95
NewBaseFunction · 0.92
IdentifierFunction · 0.92
WriteFileMethod · 0.80
AssertOKMethod · 0.80
RemoveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…