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

Function TestRunStdin

cmd/nerdctl/container/container_run_test.go:290–304  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

288}
289
290func TestRunStdin(t *testing.T) {
291 testCase := nerdtest.Setup()
292
293 const testStr = "test-run-stdin"
294
295 testCase.Command = func(data test.Data, helpers test.Helpers) test.TestableCommand {
296 cmd := helpers.Command("run", "--rm", "-i", testutil.CommonImage, "cat")
297 cmd.Feed(strings.NewReader(testStr))
298 return cmd
299 }
300
301 testCase.Expected = test.Expects(expect.ExitCodeSuccess, nil, expect.Equals(testStr))
302
303 testCase.Run(t)
304}
305
306func TestRunWithJsonFileLogDriver(t *testing.T) {
307 testCase := nerdtest.Setup()

Callers

nothing calls this directly

Calls 4

SetupFunction · 0.92
CommandMethod · 0.65
FeedMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…