| 288 | } |
| 289 | |
| 290 | func 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 | |
| 306 | func TestRunWithJsonFileLogDriver(t *testing.T) { |
| 307 | testCase := nerdtest.Setup() |